]> Creatis software - clitk.git/commitdiff
vv now builds even with all options turned off
authorschaerer <schaerer>
Tue, 27 Jul 2010 08:27:48 +0000 (08:27 +0000)
committerschaerer <schaerer>
Tue, 27 Jul 2010 08:27:48 +0000 (08:27 +0000)
CMakeLists.txt
segmentation/CMakeLists.txt

index 3670af5a4d90eea3ed10f192d41314e87660bd08..694d7b62f125c920577d8b3e9fd825746a9adefd 100644 (file)
@@ -62,15 +62,12 @@ INCLUDE_DIRECTORIES(itk filters segmentation registration tools ${PROJECT_BINARY
 # Select what is compiled
 ADD_SUBDIRECTORY(common)
 add_subdirectory(tools)
+add_subdirectory(segmentation)
 
 # Compilation options
 OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF)
 OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF)
-
-OPTION(CLITK_BUILD_SEGMENTATION "Build segmentation tools" ON)
-IF (CLITK_BUILD_SEGMENTATION)
-  add_subdirectory(segmentation)
-ENDIF (CLITK_BUILD_SEGMENTATION)
+OPTION(CLITK_BUILD_SEGMENTATION "Build segmentation tools" OFF)
 
 OPTION(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF)
 IF (CLITK_BUILD_REGISTRATION)
index a75a78eea41d6562f4885cfb110d9854b6d93254..ceb2857908734b8ecc621ec3c90d93484641270c 100644 (file)
@@ -4,74 +4,75 @@ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake)
 
 #=========================================================
 
-#Add your _ggo files to this list if they are used by vv
-ADD_LIBRARY(clitkSegmentationGgoLib clitkExtractPatient_ggo.c
-clitkExtractLung_ggo.c)
+#Add your ggo files to this list if they are used by vv
+FOREACH(clitkTool clitkExtractLung clitkExtractPatient)
+    WRAP_GGO(${clitkTool}_GGO_C ${clitkTool}.ggo)
+    SET(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C})
+ENDFOREACH(clitkTool)
+ADD_LIBRARY(clitkSegmentationGgoLib ${GGO_C_FILES})
 
 #=========================================================
 
-######################################### Segmentation part
-WRAP_GGO(clitkConnectedComponentLabeling_GGO_C clitkConnectedComponentLabeling.ggo)
-ADD_EXECUTABLE(clitkConnectedComponentLabeling clitkConnectedComponentLabeling.cxx ${clitkConnectedComponentLabeling_GGO_C})
-TARGET_LINK_LIBRARIES(clitkConnectedComponentLabeling clitkCommon ITKIO)
+IF(CLITK_BUILD_SEGMENTATION)
+    WRAP_GGO(clitkConnectedComponentLabeling_GGO_C clitkConnectedComponentLabeling.ggo)
+    ADD_EXECUTABLE(clitkConnectedComponentLabeling clitkConnectedComponentLabeling.cxx ${clitkConnectedComponentLabeling_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkConnectedComponentLabeling clitkCommon ITKIO)
 
-WRAP_GGO(clitkFillMask_GGO_C clitkFillMask.ggo)
-ADD_EXECUTABLE(clitkFillMask clitkFillMask.cxx clitkFillMaskGenericFilter.cxx ${clitkFillMask_GGO_C})
-TARGET_LINK_LIBRARIES(clitkFillMask clitkCommon ITKIO)
+    WRAP_GGO(clitkFillMask_GGO_C clitkFillMask.ggo)
+    ADD_EXECUTABLE(clitkFillMask clitkFillMask.cxx clitkFillMaskGenericFilter.cxx ${clitkFillMask_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkFillMask clitkCommon ITKIO)
 
-WRAP_GGO(clitkExtractPatient_GGO_C clitkExtractPatient.ggo)
-ADD_EXECUTABLE(clitkExtractPatient clitkExtractPatient.cxx ${clitkExtractPatient_GGO_C})
-TARGET_LINK_LIBRARIES(clitkExtractPatient clitkCommon ITKIO)
+    ADD_EXECUTABLE(clitkExtractPatient clitkExtractPatient.cxx ${clitkExtractPatient_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkExtractPatient clitkCommon ITKIO)
 
-WRAP_GGO(clitkExtractLung_GGO_C clitkExtractLung.ggo)
-ADD_EXECUTABLE(clitkExtractLung clitkExtractLung.cxx ${clitkExtractLung_GGO_C})
-TARGET_LINK_LIBRARIES(clitkExtractLung clitkCommon ITKIO)
+    ADD_EXECUTABLE(clitkExtractLung clitkExtractLung.cxx ${clitkExtractLung_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkExtractLung clitkCommon ITKIO)
 
-WRAP_GGO(clitkExtractBones_GGO_C clitkExtractBones.ggo)
-ADD_EXECUTABLE(clitkExtractBones clitkExtractBones.cxx ${clitkExtractBones_GGO_C})
-TARGET_LINK_LIBRARIES(clitkExtractBones clitkCommon ITKIO)
+    WRAP_GGO(clitkExtractBones_GGO_C clitkExtractBones.ggo)
+    ADD_EXECUTABLE(clitkExtractBones clitkExtractBones.cxx ${clitkExtractBones_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkExtractBones clitkCommon ITKIO)
 
-WRAP_GGO(clitkExtractMediastinum_GGO_C clitkExtractMediastinum.ggo)
-ADD_EXECUTABLE(clitkExtractMediastinum clitkExtractMediastinum.cxx ${clitkExtractMediastinum_GGO_C})
-TARGET_LINK_LIBRARIES(clitkExtractMediastinum clitkCommon ITKIO )
+    WRAP_GGO(clitkExtractMediastinum_GGO_C clitkExtractMediastinum.ggo)
+    ADD_EXECUTABLE(clitkExtractMediastinum clitkExtractMediastinum.cxx ${clitkExtractMediastinum_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkExtractMediastinum clitkCommon ITKIO )
 
-WRAP_GGO(clitkExtractLymphStations_GGO_C clitkExtractLymphStations.ggo)
-ADD_EXECUTABLE(clitkExtractLymphStations clitkExtractLymphStations.cxx ${clitkExtractLymphStations_GGO_C})
-TARGET_LINK_LIBRARIES(clitkExtractLymphStations clitkCommon ITKIO )
+    WRAP_GGO(clitkExtractLymphStations_GGO_C clitkExtractLymphStations.ggo)
+    ADD_EXECUTABLE(clitkExtractLymphStations clitkExtractLymphStations.cxx ${clitkExtractLymphStations_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkExtractLymphStations clitkCommon ITKIO )
 
-WRAP_GGO(clitkMorphoMath_GGO_C clitkMorphoMath.ggo)
-ADD_EXECUTABLE(clitkMorphoMath clitkMorphoMath.cxx clitkMorphoMathGenericFilter.cxx ${clitkMorphoMath_GGO_C})
-TARGET_LINK_LIBRARIES(clitkMorphoMath ITKIO clitkCommon)
+    WRAP_GGO(clitkMorphoMath_GGO_C clitkMorphoMath.ggo)
+    ADD_EXECUTABLE(clitkMorphoMath clitkMorphoMath.cxx clitkMorphoMathGenericFilter.cxx ${clitkMorphoMath_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkMorphoMath ITKIO clitkCommon)
 
-WRAP_GGO(clitkMorphoReconstruction_GGO_C clitkMorphoReconstruction.ggo)
-ADD_EXECUTABLE(clitkMorphoReconstruction clitkMorphoReconstruction.cxx clitkMorphoReconstructionGenericFilter.cxx ${clitkMorphoReconstruction_GGO_C})
-TARGET_LINK_LIBRARIES(clitkMorphoReconstruction clitkCommon ITKIO )
+    WRAP_GGO(clitkMorphoReconstruction_GGO_C clitkMorphoReconstruction.ggo)
+    ADD_EXECUTABLE(clitkMorphoReconstruction clitkMorphoReconstruction.cxx clitkMorphoReconstructionGenericFilter.cxx ${clitkMorphoReconstruction_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkMorphoReconstruction clitkCommon ITKIO )
 
-WRAP_GGO(clitkCalculateDistanceMap_GGO_C clitkCalculateDistanceMap.ggo)
-ADD_EXECUTABLE(clitkCalculateDistanceMap clitkCalculateDistanceMap.cxx clitkCalculateDistanceMapGenericFilter.cxx ${clitkCalculateDistanceMap_GGO_C})
-TARGET_LINK_LIBRARIES(clitkCalculateDistanceMap clitkCommon ITKIO)
+    WRAP_GGO(clitkCalculateDistanceMap_GGO_C clitkCalculateDistanceMap.ggo)
+    ADD_EXECUTABLE(clitkCalculateDistanceMap clitkCalculateDistanceMap.cxx clitkCalculateDistanceMapGenericFilter.cxx ${clitkCalculateDistanceMap_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkCalculateDistanceMap clitkCommon ITKIO)
 
-WRAP_GGO(clitkLevelSetSegmentation_GGO_C clitkLevelSetSegmentation.ggo)
-ADD_EXECUTABLE(clitkLevelSetSegmentation clitkLevelSetSegmentation.cxx clitkLevelSetSegmentationGenericFilter.cxx ${clitkLevelSetSegmentation_GGO_C})
-TARGET_LINK_LIBRARIES(clitkLevelSetSegmentation clitkCommon ITKIO)
+    WRAP_GGO(clitkLevelSetSegmentation_GGO_C clitkLevelSetSegmentation.ggo)
+    ADD_EXECUTABLE(clitkLevelSetSegmentation clitkLevelSetSegmentation.cxx clitkLevelSetSegmentationGenericFilter.cxx ${clitkLevelSetSegmentation_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkLevelSetSegmentation clitkCommon ITKIO)
 
-WRAP_GGO(clitkAnd_GGO_C clitkAnd.ggo)
-ADD_EXECUTABLE(clitkAnd clitkAnd.cxx clitkAndGenericFilter.cxx ${clitkAnd_GGO_C})
-TARGET_LINK_LIBRARIES(clitkAnd clitkCommon ITKIO )
+    WRAP_GGO(clitkAnd_GGO_C clitkAnd.ggo)
+    ADD_EXECUTABLE(clitkAnd clitkAnd.cxx clitkAndGenericFilter.cxx ${clitkAnd_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkAnd clitkCommon ITKIO )
 
-WRAP_GGO(clitkRegionGrowing_GGO_C clitkRegionGrowing.ggo)
-ADD_EXECUTABLE(clitkRegionGrowing clitkRegionGrowing.cxx clitkRegionGrowingGenericFilter.cxx ${clitkRegionGrowing_GGO_C})
-TARGET_LINK_LIBRARIES(clitkRegionGrowing clitkCommon ITKIO)
+    WRAP_GGO(clitkRegionGrowing_GGO_C clitkRegionGrowing.ggo)
+    ADD_EXECUTABLE(clitkRegionGrowing clitkRegionGrowing.cxx clitkRegionGrowingGenericFilter.cxx ${clitkRegionGrowing_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkRegionGrowing clitkCommon ITKIO)
 
-WRAP_GGO(clitkDecomposeAndReconstruct_GGO_C clitkDecomposeAndReconstruct.ggo)
-ADD_EXECUTABLE(clitkDecomposeAndReconstruct clitkDecomposeAndReconstruct.cxx clitkDecomposeAndReconstructGenericFilter.cxx ${clitkDecomposeAndReconstruct_GGO_C})
-TARGET_LINK_LIBRARIES(clitkDecomposeAndReconstruct clitkCommon ITKIO)
+    WRAP_GGO(clitkDecomposeAndReconstruct_GGO_C clitkDecomposeAndReconstruct.ggo)
+    ADD_EXECUTABLE(clitkDecomposeAndReconstruct clitkDecomposeAndReconstruct.cxx clitkDecomposeAndReconstructGenericFilter.cxx ${clitkDecomposeAndReconstruct_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkDecomposeAndReconstruct clitkCommon ITKIO)
 
-WRAP_GGO(clitkMotionMask_GGO_C clitkMotionMask.ggo)
-ADD_EXECUTABLE(clitkMotionMask clitkMotionMask.cxx clitkMotionMaskGenericFilter.cxx ${clitkMotionMask_GGO_C})
-TARGET_LINK_LIBRARIES(clitkMotionMask clitkCommon ITKIO ITKStatistics )
-
-WRAP_GGO(clitkFillImageRegion_GGO_C clitkFillImageRegion.ggo)
-ADD_EXECUTABLE(clitkFillImageRegion clitkFillImageRegion.cxx clitkFillImageRegionGenericFilter.cxx ${clitkFillImageRegion_GGO_C})
-TARGET_LINK_LIBRARIES(clitkFillImageRegion clitkCommon ITKIO)
+    WRAP_GGO(clitkMotionMask_GGO_C clitkMotionMask.ggo)
+    ADD_EXECUTABLE(clitkMotionMask clitkMotionMask.cxx clitkMotionMaskGenericFilter.cxx ${clitkMotionMask_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkMotionMask clitkCommon ITKIO ITKStatistics )
 
+    WRAP_GGO(clitkFillImageRegion_GGO_C clitkFillImageRegion.ggo)
+    ADD_EXECUTABLE(clitkFillImageRegion clitkFillImageRegion.cxx clitkFillImageRegionGenericFilter.cxx ${clitkFillImageRegion_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkFillImageRegion clitkCommon ITKIO)
+ENDIF(CLITK_BUILD_SEGMENTATION)