forked from patrickdemond/OVis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
97 lines (83 loc) · 2.25 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
PROJECT( ovis )
# Set the version
SET( OVIS_VERSION_MAJOR 0 )
SET( OVIS_VERSION_MINOR 1 )
SET( OVIS_VERSION_PATCH 0 )
# We need VTK
FIND_PACKAGE( VTK REQUIRED )
INCLUDE( ${VTK_USE_FILE} )
# We need QT4
SET( QT_MIN_VERSION 4.0.0 )
FIND_PACKAGE( Qt4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )
# We need LibXML2
FIND_PACKAGE( LibXml2 REQUIRED )
# Configure the utitlities header
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/ovUtilities.h.in
${PROJECT_BINARY_DIR}/ovUtilities.h @ONLY IMMEDIATE )
# Copy the readme file to build
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/readme.md
${PROJECT_BINARY_DIR}/readme.md COPYONLY )
# Set up headers and source
SET( OVIS_SOURCE
ovis.cpp
source/ovApplyColors.cpp
source/ovGraphLayoutView.cpp
source/ovOrlandoReader.cpp
source/ovOrlandoTagInfo.cpp
source/ovRenderedGraphRepresentation.cpp
source/ovRestrictGraphFilter.cpp
source/ovSearchPhrase.cpp
source/ovSession.cpp
source/ovSessionReader.cpp
source/ovSessionWriter.cpp
source/ovXMLReader.cpp
source/ovXMLWriter.cpp
interface/ovQAboutDialog.cpp
interface/ovQDateSpanDialog.cpp
interface/ovQMainWindow.cpp
interface/ovQTextSearchDialog.cpp
interface/ovQAuthorSearchDialog.cpp
)
SET_SOURCE_FILES_PROPERTIES(
ovXMLReader.cxx
ovXMLWriter.cxx
ABSTRACT
)
SET( OVIS_UIS
interface/ovQAboutDialog.ui
interface/ovQDateSpanDialog.ui
interface/ovQMainWindow.ui
interface/ovQTextSearchDialog.ui
interface/ovQAuthorSearchDialog.ui
)
SET( OVIS_HEADERS
interface/ovQAboutDialog.h
interface/ovQDateSpanDialog.h
interface/ovQMainWindow.h
interface/ovQTextSearchDialog.h
interface/ovQAuthorSearchDialog.h
)
# Wrap QT files
QT4_WRAP_UI( UIHeaders ${OVIS_UIS} )
QT4_WRAP_CPP( MOCSrcs ${OVIS_HEADERS} )
ADD_DEFINITIONS( -DQT_GUI_LIBS -DQT_CORE_LIB -DQT3_SUPPORT )
SET_SOURCE_FILES_PROPERTIES( ${OVIS_SOURCE} PROPERTIES OBJECT_DEPENDS "${UIHeaders}" )
# Use the include path and library for Qt
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_EXECUTABLE( ovis ${OVIS_SOURCE} ${OVIS_UISrcs} ${MOCSrcs} )
TARGET_LINK_LIBRARIES( ovis
QVTK
${QT_LIBRARIES}
${LIBXML2_LIBRARIES}
vtkRendering
vtkGraphics
vtkIO
vtkCommon
)