1 cmake_minimum_required(VERSION 2.4)
3 #=========================================================
4 # To avoid warning with some version
5 if(COMMAND cmake_policy)
6 cmake_policy(SET CMP0003 NEW)
7 endif(COMMAND cmake_policy)
8 #=========================================================
10 #=========================================================
11 # List of vv source files
17 vvQProgressDialogITKCommand.cxx
18 vvQDicomSeriesSelector.cxx
20 vvSegmentationDialog.cxx
21 vvSurfaceViewerDialog.cxx
25 vvDeformationDialog.cxx
27 vvDeformableRegistration.cxx
29 vvInteractorStyleNavigator.cxx
40 vvSlicerManagerCommand.cxx
42 vvMaximumIntensityProjection.cxx
48 vvImageMapToWLColors.cxx
49 vvIntensityValueSlider.cxx
54 # vvToolWidgetWithStepsBase.cxx
55 vvToolMedianFilter.cxx
58 # vvToolFooWithWidgetBase.cxx
61 vvToolSimpleInputSelectorWidget.cxx
62 vvToolInputSelectorWidget.cxx
64 vvBinaryImageOverlayActor.cxx
67 vvToolStructureSetManager.cxx
68 vvStructureSetActor.cxx
72 vvLabelImageLoaderWidget.cxx
73 vvToolExtractPatient.cxx
76 # vvToolConnectedComponentLabeling.cxx
79 #=========================================================
81 #=========================================================
83 FIND_PACKAGE(Qt4 REQUIRED)
96 vvQDicomSeriesSelector.h
97 vvSegmentationDialog.h
98 vvSurfaceViewerDialog.h
102 vvIntensityValueSlider.h
106 # vvToolFooWithWidgetBase.h
110 vvToolSimpleInputSelectorWidget.h
111 vvToolInputSelectorWidget.h
113 # vvToolWidgetWithStepsBase.h
117 vvToolStructureSetManager.h
118 vvStructureSetActor.h
121 vvLabelImageLoaderWidget.h
122 vvToolExtractPatient.h
125 # vvToolConnectedComponentLabeling.h
128 QT4_WRAP_UI(vv_UI_CXX
129 qt_ui/vvMainWindow.ui
132 qt_ui/vvOverlayPanel.ui
133 qt_ui/vvLandmarksPanel.ui
134 qt_ui/vvHelpDialog.ui
135 qt_ui/vvDocumentation.ui
136 qt_ui/vvProgressDialog.ui
137 qt_ui/vvDicomSeriesSelector.ui
138 qt_ui/vvSegmentationDialog.ui
139 qt_ui/vvSurfaceViewerDialog.ui
140 qt_ui/vvDeformationDialog.ui
141 qt_ui/vvStructSelector.ui
142 qt_ui/vvDummyWindow.ui #For testing
143 qt_ui/vvIntensityValueSlider.ui
144 qt_ui/vvToolSimpleInputSelectorWidget.ui
145 qt_ui/vvToolInputSelectorWidget.ui
146 qt_ui/vvToolWidgetBase.ui
147 # qt_ui/vvToolWidgetWithStepsBase.ui
148 qt_ui/vvToolMedianFilter.ui
149 qt_ui/vvToolRigidReg.ui
151 qt_ui/vvToolCropImage.ui
152 qt_ui/vvToolBinarize.ui
153 qt_ui/vvToolImageArithm.ui
154 qt_ui/vvToolStructureSetManager.ui
155 qt_ui/vvToolResample.ui
156 qt_ui/vvLabelImageLoaderWidget.ui
157 qt_ui/vvToolExtractPatient.ui
158 qt_ui/vvToolExtractLung.ui
159 qt_ui/vvToolPlastimatch.ui
160 # qt_ui/vvToolConnectedComponentLabeling.ui
163 QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
166 # if Windows and Qt was built as a static lib then don't set QT_DLL flag
169 IF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
170 FILE(READ ${QT_LIBRARY_DIR}/QtCore.prl QT_CORE_PRL)
171 IF(${QT_CORE_PRL} MATCHES "static")
173 ENDIF(${QT_CORE_PRL} MATCHES "static")
174 ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
177 ADD_DEFINITIONS(-DQT_DLL)
180 ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)
185 ${QT_QTGUI_INCLUDE_DIR}
186 ${QT_QTCORE_INCLUDE_DIR}
187 ${CMAKE_CURRENT_BINARY_DIR}
188 ${CMAKE_CURRENT_SOURCE_DIR}
190 #=========================================================
192 #=========================================================
193 #support for parallel deformable registration with OpenMP
195 IF(CMAKE_COMPILER_IS_GNUCC)
196 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
197 ENDIF(CMAKE_COMPILER_IS_GNUCC)
199 #=========================================================
201 #=========================================================
209 SET(EXE_ICON vvIcon.rc)
212 LINK_DIRECTORIES(${QT_INCLUDES})
213 ADD_EXECUTABLE(vv ${vv_SRCS} vv.cxx ${vv_UI_CXX} ${EXE_ICON})
214 ADD_DEPENDENCIES(vv clitkToolsGgoLib clitkSegmentationGgoLib)
215 TARGET_LINK_LIBRARIES(vv clitkDicomRTStruct
216 #Libs for generic filters with long compilation times
218 clitkImageResampleLib
219 clitkBinarizeImageLib
220 #Libs for _ggo.c files
221 clitkSegmentationGgoLib clitkToolsGgoLib
222 clitkRegistrationGgoLib
223 clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
225 #=========================================================
227 #=========================================================
228 # Install options (also used by CPack)
229 IF(UNIX AND NOT APPLE)
230 INSTALL (FILES ${EXECUTABLE_OUTPUT_PATH}/vv DESTINATION . PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
231 INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/ducky.png DESTINATION .)
234 #FOREACH(LIB QtCore QtGui QtOpenGL QtNetwork QtSql)
235 # INSTALL(FILES "${QT_LIBRARY_DIR}/lib${LIB}.so.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}"
236 # RENAME "lib${LIB}.so.${QT_VERSION_MAJOR}"
239 ENDIF(UNIX AND NOT APPLE)
242 #INCLUDE(InstallRequiredSystemLibraries)
243 INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/vv.exe DESTINATION .)
244 #INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/ducky.png DESTINATION .)
246 #=========================================================
248 #=========================================================
250 SET(CPACK_PACKAGE_NAME "vv")
251 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "vv-src")
252 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "vv, the 4D slicer : let's jump into a new dimension !")
253 SET(CPACK_PACKAGE_VENDOR "Creatis-CLB")
254 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
255 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
256 SET(CPACK_PACKAGE_VERSION_MAJOR "1")
257 SET(CPACK_PACKAGE_VERSION_MINOR "1")
258 SET(CPACK_PACKAGE_VERSION_PATCH "0")
259 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "vv")
262 # There is a bug in NSI that does not handle full unix paths properly. Make
263 # sure there is at least one set of four (4) backlasshes.
264 SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\icons\\\\ducky.ico")
265 SET(CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_BUILD_TYPE}\\\\vv.exe")
266 SET(CPACK_NSIS_DISPLAY_NAME "vv - The 4D slicer")
267 SET(CPACK_NSIS_HELP_LINK "http://www.creatis.insa-lyon.fr/rio/vv")
268 SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.creatis.insa-lyon.fr/rio")
269 SET(CPACK_NSIS_CONTACT "vv@creatis.insa-lyon.fr")
270 SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\vv.lnk\\\" \\\"$INSTDIR\\\\vv.exe\\\" ")
271 SET(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\vv.lnk\\\" ")
272 #SET(CPACK_NSIS_MODIFY_PATH ON) SR: buggy, wait for cmake updates for a fix
273 #SET(CPACK_BINARY_ZIP ON)
275 SET(CPACK_GENERATOR "STGZ")
276 SET(CPACK_SOURCE_GENERATOR "TGZ")
279 #=========================================================