-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
222 lines (204 loc) · 4.77 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
if(POLICY CMP0043)
cmake_policy(SET CMP0043 NEW) # CMake 3.0
endif()
if(POLICY CMP0053)
cmake_policy(SET CMP0053 NEW) # CMake 3.1
endif()
project(vascuview)
find_package(VTK COMPONENTS
vtkCommonCore
vtkFiltersSources
vtkGUISupportQt
vtkIOImage
vtkInteractionImage
vtkalglib
vtkChartsCore
vtkCommonColor
vtkCommonComputationalGeometry
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMath
vtkCommonMisc
vtkCommonSystem
vtkCommonTransforms
vtkDICOMParser
vtkDomainsChemistry
vtkexodusII
vtkexpat
vtkFiltersAMR
vtkFiltersCore
vtkFiltersExtraction
vtkFiltersFlowPaths
vtkFiltersGeneral
vtkFiltersGeneric
vtkFiltersGeometry
vtkFiltersHybrid
vtkFiltersHyperTree
vtkFiltersImaging
vtkFiltersModeling
vtkFiltersParallel
vtkFiltersParallelImaging
vtkFiltersProgrammable
vtkFiltersSelection
vtkFiltersSMP
vtkFiltersSources
vtkFiltersStatistics
vtkFiltersTexture
vtkFiltersVerdict
vtkfreetype
vtkftgl
vtkGeovisCore
vtkgl2ps
vtkhdf5
vtkImagingColor
vtkImagingCore
vtkImagingFourier
vtkImagingGeneral
vtkImagingHybrid
vtkImagingMath
vtkImagingMorphological
vtkImagingSources
vtkImagingStatistics
vtkImagingStencil
vtkInfovisCore
vtkInfovisLayout
vtkInteractionImage
vtkInteractionStyle
vtkInteractionWidgets
vtkIOAMR
vtkIOCore
vtkIOEnSight
vtkIOExodus
vtkIOExport
vtkIOGeometry
vtkIOImage
vtkIOImport
vtkIOInfovis
vtkIOLegacy
vtkIOLSDyna
vtkIOMINC
vtkIOMovie
vtkIONetCDF
vtkIOParallel
vtkIOParallelXML
vtkIOPLY
vtkIOSQL
vtkIOVideo
vtkIOXML
vtkIOXMLParser
vtkjpeg
vtkjsoncpp
vtklibproj4
vtklibxml2
vtkMetaIO
vtknetcdf
vtkoggtheora
vtkParallelCore
vtkParseOGLExt
vtkpng
vtkRenderingAnnotation
vtkRenderingContext2D
vtkRenderingContextOpenGL
vtkRenderingCore
vtkRenderingFreeType
vtkRenderingGL2PS
vtkRenderingImage
vtkRenderingLabel
vtkRenderingLIC
vtkRenderingLOD
vtkRenderingOpenGL
vtkRenderingQt
vtkRenderingVolume
vtkRenderingVolumeOpenGL
vtksqlite
vtksys
vtktiff
vtkUtilitiesEncodeString
vtkUtilitiesHashSource
vtkverdict
vtkViewsContext2D
vtkViewsCore
vtkViewsInfovis
vtkViewsQt
vtkzlib
)
include(${VTK_USE_FILE})
if("${VTK_QT_VERSION}" STREQUAL "")
message(FATAL_ERROR "VTK was not built with Qt")
endif()
# Set your files and resources here
set( Srcs QtVTKRenderWindowsApp.cxx QtVTKRenderWindows.cxx VascuviewUtility.cpp vmtkImageFeatures.cpp vmtkLevelSetSegmentation.cpp
vmtkSurfaceViewer.cpp vmtkImageInitialization.cpp vmtkImageSeeder.cpp ChooseInitializationType.cpp ThresholdDialog.cpp YNDialog.cpp LevelSetDialog.cpp)
set( Hdrs QtVTKRenderWindows.h VascuviewUtility.h vtkResliceCursorCallback.h vtkUpdateCubeCallback.h vtkHideCubeCallback.h NullPointerException.h
vmtkImageFeature.h vmtkLevelSetSegmentation.h vtkAddSeedCallBack.h vmtkSurfaceViewer.h vmtkImageSeeder.h vmtkImageInitialization.h
Uncopyable.h ChooseInitializationType.h ThresholdDialog.h YNDialog.h LevelSetDialog.h)
set( MOC_Hdrs QtVTKRenderWindows.h )
set( UIs QtVTKRenderWindows.ui ChooseInitializationType.ui YNDialog.ui Threshold.ui LevelSetDialog.ui)
#¼ÓÈëlog4cppÅäÖÃÎļþ
set( LOGs log4cpp.conf )
set(QRCs icons.qrc)
set(LinkedVmtk
vtkvmtkCommon
vtkvmtkComputationalGeometry
vtkvmtkContrib
vtkvmtkDifferentialGeometry
vtkvmtkIO
vtkvmtkITK
vtkvmtkMisc
vtkvmtkRendering
vtkvmtkSegmentation
)
set(LinkedLog
log4cpp
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
#¼ÓÈëVMTK_LIB
include_directories(VMTK_LIB/include ..)
link_directories(VMTK_LIB/lib)
#¼ÓÈëlog4cpp
include_directories(LOG_HOME/include ..)
link_directories(LOG_HOME/lib)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
if(VTK_QT_VERSION VERSION_GREATER "4")
find_package(Qt5 COMPONENTS Widgets REQUIRED QUIET)
qt5_wrap_ui(UI_Srcs ${UIs})
qt5_add_resources(QRC_Srcs ${QRCs} )
source_group("Resources" FILES
${UIs}
${QRCs}
${EXE_ICON} # Not present
${LOGs}
)
source_group("Generated" FILES
${UI_Srcs}
${MOC_Srcs}
${QRC_Srcs}
${QRC_Srcs}
)
# CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped.
add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
qt5_use_modules(QtVTKRenderWindows Core Gui Widgets)
target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES} ${LinkedVmtk} ${LinkedLog})
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
# Use what VTK built with
set(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")
set(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")
set(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")
qt4_wrap_ui(UI_Srcs ${UIs})
add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs})
target_link_libraries(QtVTKRenderWindows ${QT_LIBRARIES} ${VTK_LIBRARIES})
endif()