]> Creatis software - clitk.git/blobdiff - vv/CMakeLists.txt
fix warning
[clitk.git] / vv / CMakeLists.txt
index b68af54d940b32686036140c1ab96d973eaa2724..4d7079e10dc0b354b0d7597cc2e14a8c4d0ef538 100644 (file)
@@ -7,6 +7,29 @@ if(COMMAND cmake_policy)
 endif(COMMAND cmake_policy)
 #=========================================================
 
+#List of vv tools to compile
+SET(vv_TOOLS
+  vvToolWidgetBase
+#  vvToolWidgetWithStepsBase
+  vvToolMedianFilter
+#  vvToolRigidReg
+#  vvToolFoo
+#  vvToolFooWithWidgetBase
+#  vvToolCropImage
+  vvToolBinarize
+  vvToolSimpleInputSelectorWidget
+  vvToolInputSelectorWidget
+  vvToolImageArithm
+  vvToolStructureSetManager
+  vvToolResample
+  vvToolExtractPatient
+  vvToolExtractLung
+#  vvToolPlastimatch
+#  vvToolConnectedComponentLabeling
+)
+#dependencies of the tools
+SET(vvToolRigidReg_LIBS clitkAffineRegistrationLib)
+
 #=========================================================
 # List of vv source files
 SET(vv_SRCS
@@ -21,6 +44,7 @@ SET(vv_SRCS
   vvSurfaceViewerDialog.cxx
   vvMainWindowBase.cxx
   vvMainWindow.cxx
+  vvProgressDialog.cxx
   vvDeformationDialog.cxx
   vvImageWarp.cxx
   vvDeformableRegistration.cxx
@@ -46,30 +70,18 @@ SET(vv_SRCS
   vvMidPosition.cxx
   vvImageMapToWLColors.cxx
   vvIntensityValueSlider.cxx
-  vvToolManager.cxx
-  vvToolCreatorBase.cxx
-  vvToolWidgetBase.cxx
-  vvToolWidgetWithStepsBase.cxx
-  vvToolMedianFilter.cxx
-  vvToolRigidReg.cxx
-#  vvToolFoo.cxx
-#  vvToolFooWithWidgetBase.cxx
-  vvToolCropImage.cxx
-  vvToolBinarize.cxx
-  vvToolSimpleInputSelectorWidget.cxx
-  vvToolInputSelectorWidget.cxx
+  vvThreadedFilter.cxx
   vvImageContour.cxx
   vvBinaryImageOverlayActor.cxx
-  vvToolImageArithm.cxx
-  vvToolConvert.cxx
-  vvToolStructureSetManager.cxx
   vvStructureSetActor.cxx
   vvROIActor.cxx
-  vvToolResample.cxx
   vvBlendImageActor.cxx
-#  vvToolExtractLung.cxx
-#  vvToolConnectedComponentLabeling.cxx
-  )
+  vvLabelImageLoaderWidget.cxx
+  vvToolManager.cxx
+  vvToolCreatorBase.cxx
+  vvToolConvert.cxx
+)
+
 #=========================================================
 
 #=========================================================
@@ -94,25 +106,12 @@ QT4_WRAP_CPP(vv_SRCS
   vvSlicerManager.h
   vvStructSelector.h
   vvIntensityValueSlider.h
-  vvToolCreatorBase.h
-#  vvToolFoo.h
-#  vvToolFooWithWidgetBase.h
-  vvToolMedianFilter.h
-  vvToolRigidReg.h
-  vvToolBinarize.h
-  vvToolSimpleInputSelectorWidget.h
-  vvToolInputSelectorWidget.h
-  vvToolWidgetBase.h
-  vvToolWidgetWithStepsBase.h
-  vvToolCropImage.h
-  vvToolImageArithm.h
-  vvToolConvert.h
-  vvToolStructureSetManager.h
+  vvThreadedFilter.h
   vvStructureSetActor.h
   vvROIActor.h
-  vvToolResample.h
-#  vvToolExtractLung.h
-#  vvToolConnectedComponentLabeling.h
+  vvLabelImageLoaderWidget.h
+  vvToolCreatorBase.h
+  vvToolConvert.h
   )
 
 QT4_WRAP_UI(vv_UI_CXX 
@@ -131,24 +130,17 @@ QT4_WRAP_UI(vv_UI_CXX
   qt_ui/vvStructSelector.ui
   qt_ui/vvDummyWindow.ui #For testing
   qt_ui/vvIntensityValueSlider.ui
-  qt_ui/vvToolSimpleInputSelectorWidget.ui
-  qt_ui/vvToolInputSelectorWidget.ui
-  qt_ui/vvToolWidgetBase.ui
-  qt_ui/vvToolWidgetWithStepsBase.ui
-  qt_ui/vvToolMedianFilter.ui
-  qt_ui/vvToolRigidReg.ui
-#  qt_ui/vvToolFoo.ui
-  qt_ui/vvToolCropImage.ui
-  qt_ui/vvToolBinarize.ui
-  qt_ui/vvToolImageArithm.ui
-  qt_ui/vvToolStructureSetManager.ui
-  qt_ui/vvToolResample.ui
-#  qt_ui/vvToolExtractLung.ui
-#  qt_ui/vvToolConnectedComponentLabeling.ui
+  qt_ui/vvLabelImageLoaderWidget.ui
   )
 
 QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
 
+#Add the autotools
+foreach(tool ${vv_TOOLS})
+    SET(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+    QT4_WRAP_CPP(vv_SRCS ${tool}.h)
+    QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui)
+endforeach(tool)
 
 # if Windows and Qt was built as a static lib then don't set QT_DLL flag
 SET(QT_STATIC 0)
@@ -198,9 +190,28 @@ ENDIF(WIN32)
 
 LINK_DIRECTORIES(${QT_INCLUDES})
 ADD_EXECUTABLE(vv ${vv_SRCS} vv.cxx ${vv_UI_CXX} ${EXE_ICON})
-TARGET_LINK_LIBRARIES(vv clitkCommon clitkDicomRTStruct clitkFilters clitkSegmentationFilters ${ITK_LIBRARIES} QVTK vtkHybrid)
+ADD_DEPENDENCIES(vv clitkToolsGgoLib clitkSegmentationGgoLib)
+TARGET_LINK_LIBRARIES(vv clitkDicomRTStruct 
+#Libs for generic filters with long compilation times
+clitkImageConvertLib 
+clitkImageResampleLib
+clitkBinarizeImageLib
+#Libs for _ggo.c files
+clitkSegmentationGgoLib clitkToolsGgoLib
+clitkRegistrationGgoLib
+)
+
+#=========================================================
+#Add each tool's dependencies
+foreach(tool ${vv_TOOLS})
+    target_link_libraries(vv ${${tool}_LIBS})
+endforeach(tool)
 
 #=========================================================
+#Add Foundation Libraries (this should be after our libraries, since we depend
+#on them)
+TARGET_LINK_LIBRARIES(vv
+clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
 
 #=========================================================
 # Install options (also used by CPack)