From: schaerer Date: Tue, 27 Jul 2010 08:15:29 +0000 (+0000) Subject: improvements to the build process: X-Git-Tag: v1.2.0~471 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=25e34ab26032bd169b35a883c4b02e55d5a8c6dc;p=clitk.git improvements to the build process: * vv should build whether or CLITK_BUILD_TOOLS is activated * _ggo.c files used by vv are put into a lib by directory * big generic filters are compiled into a lib per generic filter, to avoid recompilation --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b3ecc99..3670af5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,20 +61,11 @@ INCLUDE_DIRECTORIES(itk filters segmentation registration tools ${PROJECT_BINARY # Select what is compiled ADD_SUBDIRECTORY(common) -ADD_SUBDIRECTORY(filters) +add_subdirectory(tools) # Compilation options OPTION(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF) - -OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON) -IF (CLITK_BUILD_VV) - add_subdirectory(vv) -ENDIF(CLITK_BUILD_VV) - OPTION(CLITK_BUILD_TOOLS "Build command-line tools" OFF) -IF (CLITK_BUILD_TOOLS) - add_subdirectory(tools) -ENDIF(CLITK_BUILD_TOOLS) OPTION(CLITK_BUILD_SEGMENTATION "Build segmentation tools" ON) IF (CLITK_BUILD_SEGMENTATION) @@ -86,5 +77,10 @@ IF (CLITK_BUILD_REGISTRATION) add_subdirectory(registration) ENDIF(CLITK_BUILD_REGISTRATION) +OPTION(CLITK_BUILD_VV "Build vv the 4D visualizer (requires VTK and QT)" ON) +IF (CLITK_BUILD_VV) + add_subdirectory(vv) +ENDIF(CLITK_BUILD_VV) + #========================================================= diff --git a/cmake/common.cmake b/cmake/common.cmake index 8d382ba..eeb8755 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -26,11 +26,12 @@ MACRO (WRAP_GGO GGO_SRCS) SET(${GGO_SRCS} ${${GGO_SRCS}} ${CMAKE_CURRENT_BINARY_DIR}/${GGO_BASEFILENAME}_ggo.c) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) #For _ggo.h includes ENDFOREACH(GGO_FILE) + SET_SOURCE_FILES_PROPERTIES(${${GGO_SRCS}} PROPERTIES GENERATED TRUE) ENDMACRO (WRAP_GGO) # Reproduce old mechanism with new macro for ggo files (for the time being) FILE(GLOB ALL_GGO_FILES *.ggo) -WRAP_GGO(ALL_GGO_SRCS ${ALL_GGO_FILES}) +#WRAP_GGO(ALL_GGO_SRCS ${ALL_GGO_FILES}) #========================================================= #Set a reasonable build mode default if the user hasn't set any if (NOT CMAKE_BUILD_TYPE) diff --git a/segmentation/CMakeLists.txt b/segmentation/CMakeLists.txt index feb9906..a75a78e 100644 --- a/segmentation/CMakeLists.txt +++ b/segmentation/CMakeLists.txt @@ -4,29 +4,12 @@ INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake) #========================================================= -SET( CMAKE_VERBOSE_MAKEFILE off) +#Add your _ggo files to this list if they are used by vv +ADD_LIBRARY(clitkSegmentationGgoLib clitkExtractPatient_ggo.c +clitkExtractLung_ggo.c) #========================================================= -# WRAP_GGO(clitkSegmentationFilters_GGO_C -# clitkFillMask.ggo -# clitkConnectedComponentLabeling.ggo -# clitkExtractLung.ggo -# clitkExtractPatient.ggo -# clitkExtractBones.ggo -# clitkExtractMediastinum.ggo -# clitkExtractLymphStations.ggo -# ) - -# SET(clitkSegmentationFilters_SRC -# ${clitkSegmentationFilters_GGO_C} -# ) - -# ADD_LIBRARY(clitkSegmentationFilters STATIC ${clitkSegmentationFilters_SRC}) - -# ADD_EXECUTABLE(clitkTestFilter clitkTestFilter.cxx clitkTestFilter_ggo.c) -# TARGET_LINK_LIBRARIES(clitkTestFilter clitkCommon ITKIO clitkSegmentationFilters ITKStatistics) - ######################################### Segmentation part WRAP_GGO(clitkConnectedComponentLabeling_GGO_C clitkConnectedComponentLabeling.ggo) ADD_EXECUTABLE(clitkConnectedComponentLabeling clitkConnectedComponentLabeling.cxx ${clitkConnectedComponentLabeling_GGO_C}) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index b273429..3550c48 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,212 +1,227 @@ #========================================================= INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake) #========================================================= +#Add your ggo files to this list if they are used by vv +FOREACH(clitkTool clitkAffineTransform clitkBinarizeImage clitkImageArithm + clitkMedianImageFilter) + WRAP_GGO(${clitkTool}_GGO_C ${clitkTool}.ggo) + SET(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C}) +ENDFOREACH(clitkTool) +ADD_LIBRARY(clitkToolsGgoLib ${GGO_C_FILES}) -WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo) -ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C}) -TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon ITKIO) +#========================================================= +#the libraries avoid recompilation for vv, and should be used for generic filters +#with long compilation times that are used by vv +ADD_LIBRARY(clitkImageConvertLib clitkImageConvertGenericFilter.cxx) +ADD_LIBRARY(clitkImageResampleLib clitkImageResampleGenericFilter.cxx) + +IF (CLITK_BUILD_TOOLS) + WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo) + ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C}) + TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon ITKIO) + + WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo) + ADD_EXECUTABLE(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageInfo clitkCommon ITKIO) -WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo) -ADD_EXECUTABLE(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageInfo clitkCommon ITKIO) + ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx + ${clitkImageConvert_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageConvert clitkImageConvertLib clitkCommon ITKIO) -WRAP_GGO(clitkImageConvert_GGO_C clitkImageConvert.ggo) -ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageConvert clitkCommon ITKIO) + # ADD_EXECUTABLE(clitkImageResample clitkImageResample.cxx + # ${clitkImageResample_GGO_C}) + # TARGET_LINK_LIBRARIES(clitkImageResample clitkImageResampleLib clitkCommon ITKIO ) -# WRAP_GGO(clitkImageResample_GGO_C clitkImageResample.ggo) -# ADD_EXECUTABLE(clitkImageResample clitkImageResample.cxx ${clitkImageResample_GGO_C}) -# TARGET_LINK_LIBRARIES(clitkImageResample clitkCommon ITKIO ) + ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageConvert clitkCommon ITKIO) -WRAP_GGO(clitkVFResample_GGO_C clitkImageResample.ggo) -ADD_EXECUTABLE(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C}) -TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon ITKIO) + WRAP_GGO(clitkVFResample_GGO_C clitkImageResample.ggo) + ADD_EXECUTABLE(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C}) + TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon ITKIO) -WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo) -ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon ITKIO) + WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo) + ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon ITKIO) -WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo) -ADD_EXECUTABLE(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx) -TARGET_LINK_LIBRARIES(clitkZeroVF clitkCommon ITKIO) + WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo) + ADD_EXECUTABLE(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx) + TARGET_LINK_LIBRARIES(clitkZeroVF clitkCommon ITKIO) -WRAP_GGO(clitkImageExtractLine_GGO_C clitkImageExtractLine.ggo) -ADD_EXECUTABLE(clitkImageExtractLine clitkImageExtractLine.cxx ${clitkImageExtractLine_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageExtractLine clitkCommon ITKIO) + WRAP_GGO(clitkImageExtractLine_GGO_C clitkImageExtractLine.ggo) + ADD_EXECUTABLE(clitkImageExtractLine clitkImageExtractLine.cxx ${clitkImageExtractLine_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageExtractLine clitkCommon ITKIO) -WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo) -ADD_EXECUTABLE(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkSplitImage clitkCommon ITKIO ) + WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo) + ADD_EXECUTABLE(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkSplitImage clitkCommon ITKIO ) -WRAP_GGO(clitkVFMerge_GGO_C clitkVFMerge.ggo) -ADD_EXECUTABLE(clitkVFMerge clitkVFMerge.cxx ${clitkVFMerge_GGO_C}) -TARGET_LINK_LIBRARIES(clitkVFMerge ITKBasicFilters clitkCommon ITKIO) + WRAP_GGO(clitkVFMerge_GGO_C clitkVFMerge.ggo) + ADD_EXECUTABLE(clitkVFMerge clitkVFMerge.cxx ${clitkVFMerge_GGO_C}) + TARGET_LINK_LIBRARIES(clitkVFMerge ITKBasicFilters clitkCommon ITKIO) -WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo) -ADD_EXECUTABLE(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C}) -TARGET_LINK_LIBRARIES(clitkWriteDicomSeries clitkCommon ITKIO ) + WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo) + ADD_EXECUTABLE(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C}) + TARGET_LINK_LIBRARIES(clitkWriteDicomSeries clitkCommon ITKIO ) -WRAP_GGO(clitkAverageTemporalDimension_GGO_C clitkAverageTemporalDimension.ggo) -ADD_EXECUTABLE(clitkAverageTemporalDimension clitkAverageTemporalDimension.cxx ${clitkAverageTemporalDimension_GGO_C}) -TARGET_LINK_LIBRARIES(clitkAverageTemporalDimension clitkCommon ITKIO ) + WRAP_GGO(clitkAverageTemporalDimension_GGO_C clitkAverageTemporalDimension.ggo) + ADD_EXECUTABLE(clitkAverageTemporalDimension clitkAverageTemporalDimension.cxx ${clitkAverageTemporalDimension_GGO_C}) + TARGET_LINK_LIBRARIES(clitkAverageTemporalDimension clitkCommon ITKIO ) -WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo) -ADD_EXECUTABLE(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx) -TARGET_LINK_LIBRARIES(clitkWarpImage ITKBasicFilters clitkCommon ITKIO) + WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo) + ADD_EXECUTABLE(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx) + TARGET_LINK_LIBRARIES(clitkWarpImage ITKBasicFilters clitkCommon ITKIO) -WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo) -ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C}) -TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ITKIO ) + WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo) + ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C}) + TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ITKIO ) -WRAP_GGO(clitkAffineTransform_GGO_C clitkAffineTransform.ggo) -ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C}) -TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon ITKIO ) + ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C}) + TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon ITKIO ) -WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo) -ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C}) -TARGET_LINK_LIBRARIES(clitkSetBackground clitkCommon ITKIO) + WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo) + ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C}) + TARGET_LINK_LIBRARIES(clitkSetBackground clitkCommon ITKIO) -WRAP_GGO(clitkGuerreroVentilation_GGO_C clitkGuerreroVentilation.ggo) -ADD_EXECUTABLE(clitkGuerreroVentilation clitkGuerreroVentilation.cxx clitkGuerreroVentilationGenericFilter.cxx ${clitkGuerreroVentilation_GGO_C}) -TARGET_LINK_LIBRARIES(clitkGuerreroVentilation clitkCommon ITKIO) + WRAP_GGO(clitkGuerreroVentilation_GGO_C clitkGuerreroVentilation.ggo) + ADD_EXECUTABLE(clitkGuerreroVentilation clitkGuerreroVentilation.cxx clitkGuerreroVentilationGenericFilter.cxx ${clitkGuerreroVentilation_GGO_C}) + TARGET_LINK_LIBRARIES(clitkGuerreroVentilation clitkCommon ITKIO) -WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo) -ADD_EXECUTABLE(clitkImageArithm clitkImageArithm.cxx ${clitkImageArithm_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageArithm clitkCommon ITKIO ) + WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo) + ADD_EXECUTABLE(clitkImageArithm clitkImageArithm.cxx ${clitkImageArithm_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageArithm clitkCommon ITKIO ) -WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo) -ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C}) -TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon ITKIO ) + WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo) + ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C}) + TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon ITKIO ) -WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo) -ADD_EXECUTABLE(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkFooImage clitkCommon ITKIO ) + WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo) + ADD_EXECUTABLE(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkFooImage clitkCommon ITKIO ) -WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo) -ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C}) -TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkCommon ITKIO ITKBasicFilters ) + ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C}) + TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkCommon ITKIO ITKBasicFilters ) -WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo) -ADD_EXECUTABLE(clitkResampleImage clitkResampleImage.cxx clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkResampleImage clitkCommon ITKIO) + WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo) + ADD_EXECUTABLE(clitkResampleImage clitkResampleImage.cxx clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkResampleImage clitkCommon ITKIO) -WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo) -ADD_EXECUTABLE(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C}) -TARGET_LINK_LIBRARIES(clitkMinMaxMask clitkCommon ITKIO ) + WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo) + ADD_EXECUTABLE(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C}) + TARGET_LINK_LIBRARIES(clitkMinMaxMask clitkCommon ITKIO ) -WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo) -ADD_EXECUTABLE(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C}) -TARGET_LINK_LIBRARIES(clitkAutoCrop clitkCommon ITKIO ) + WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo) + ADD_EXECUTABLE(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C}) + TARGET_LINK_LIBRARIES(clitkAutoCrop clitkCommon ITKIO ) -WRAP_GGO(clitkDicomRTStruct2BinaryImage_GGO_C clitkDicomRTStruct2BinaryImage.ggo) -ADD_EXECUTABLE(clitkDicomRTStruct2BinaryImage clitkDicomRT_ROI_ConvertToImageFilter.cxx clitkDicomRTStruct2BinaryImage.cxx ${clitkDicomRTStruct2BinaryImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkDicomRTStruct2BinaryImage ITKCommon clitkDicomRTStruct clitkCommon ITKIO QVTK) + WRAP_GGO(clitkDicomRTStruct2BinaryImage_GGO_C clitkDicomRTStruct2BinaryImage.ggo) + ADD_EXECUTABLE(clitkDicomRTStruct2BinaryImage clitkDicomRT_ROI_ConvertToImageFilter.cxx clitkDicomRTStruct2BinaryImage.cxx ${clitkDicomRTStruct2BinaryImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkDicomRTStruct2BinaryImage ITKCommon clitkDicomRTStruct clitkCommon ITKIO QVTK) -WRAP_GGO(clitkImageLog_GGO_C clitkImageLog.ggo) -ADD_EXECUTABLE(clitkImageLog clitkImageLog.cxx ${clitkImageLog_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageLog ITKIO clitkCommon) + WRAP_GGO(clitkImageLog_GGO_C clitkImageLog.ggo) + ADD_EXECUTABLE(clitkImageLog clitkImageLog.cxx ${clitkImageLog_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageLog ITKIO clitkCommon) -WRAP_GGO(clitkFilter_GGO_C clitkFilter.ggo) -ADD_EXECUTABLE(clitkFilter clitkFilter.cxx clitkFilterGenericFilter.cxx ${clitkFilter_GGO_C}) -TARGET_LINK_LIBRARIES(clitkFilter ITKIO clitkCommon) + WRAP_GGO(clitkFilter_GGO_C clitkFilter.ggo) + ADD_EXECUTABLE(clitkFilter clitkFilter.cxx clitkFilterGenericFilter.cxx ${clitkFilter_GGO_C}) + TARGET_LINK_LIBRARIES(clitkFilter ITKIO clitkCommon) -WRAP_GGO(clitkConeBeamProjectImage_GGO_C clitkConeBeamProjectImage.ggo) -ADD_EXECUTABLE(clitkConeBeamProjectImage clitkConeBeamProjectImage.cxx clitkConeBeamProjectImageGenericFilter.cxx ${clitkConeBeamProjectImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkConeBeamProjectImage ITKIO clitkCommon ) + WRAP_GGO(clitkConeBeamProjectImage_GGO_C clitkConeBeamProjectImage.ggo) + ADD_EXECUTABLE(clitkConeBeamProjectImage clitkConeBeamProjectImage.cxx clitkConeBeamProjectImageGenericFilter.cxx ${clitkConeBeamProjectImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkConeBeamProjectImage ITKIO clitkCommon ) -WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo) -ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C}) -TARGET_LINK_LIBRARIES(clitkComposeVF ITKBasicFilters ITKIO clitkCommon) + WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo) + ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C}) + TARGET_LINK_LIBRARIES(clitkComposeVF ITKBasicFilters ITKIO clitkCommon) -WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo) -ADD_EXECUTABLE(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C}) -TARGET_LINK_LIBRARIES(clitkMergeSequence ITKIO clitkCommon) + WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo) + ADD_EXECUTABLE(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C}) + TARGET_LINK_LIBRARIES(clitkMergeSequence ITKIO clitkCommon) -WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo) -ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkBackProjectImage ITKIO clitkCommon ) + WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo) + ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkBackProjectImage ITKIO clitkCommon ) -WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo) -ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkCropImage clitkCommon ITKIO) + WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo) + ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkCropImage clitkCommon ITKIO) # WRAP_GGO(clitkExtractSlice_GGO_C clitkExtractSlice.ggo) # ADD_EXECUTABLE(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C}) # TARGET_LINK_LIBRARIES(clitkExtractSlice clitkCommon ITKIO) -WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo) -ADD_EXECUTABLE(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkFlipImage clitkCommon ITKIO) - -WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo) -ADD_EXECUTABLE(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkMirrorPadImage clitkCommon ITKIO) - -WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo) -ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon ITKIO) - -WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo) -ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageStatistics clitkCommon ITKIO ITKStatistics) - -WRAP_GGO(clitkSetOrigin_GGO_C clitkSetOrigin.ggo) -ADD_EXECUTABLE(clitkSetOrigin clitkSetOrigin.cxx clitkSetOriginGenericFilter.cxx ${clitkSetOrigin_GGO_C}) -TARGET_LINK_LIBRARIES(clitkSetOrigin clitkCommon ITKIO ) - -WRAP_GGO(clitkGetOrigin_GGO_C clitkGetOrigin.ggo) -ADD_EXECUTABLE(clitkGetOrigin clitkGetOrigin.cxx clitkGetOriginGenericFilter.cxx ${clitkGetOrigin_GGO_C}) -TARGET_LINK_LIBRARIES(clitkGetOrigin clitkCommon ITKIO ) - -WRAP_GGO(clitkGetDirection_GGO_C clitkGetDirection.ggo) -ADD_EXECUTABLE(clitkGetDirection clitkGetDirection.cxx clitkGetDirectionGenericFilter.cxx ${clitkGetDirection_GGO_C}) -TARGET_LINK_LIBRARIES(clitkGetDirection clitkCommon ITKIO) - -WRAP_GGO(clitkSetDirection_GGO_C clitkSetDirection.ggo) -ADD_EXECUTABLE(clitkSetDirection clitkSetDirection.cxx clitkSetDirectionGenericFilter.cxx ${clitkSetDirection_GGO_C}) -TARGET_LINK_LIBRARIES(clitkSetDirection clitkCommon ITKIO) - -WRAP_GGO(clitkGetSize_GGO_C clitkGetSize.ggo) -ADD_EXECUTABLE(clitkGetSize clitkGetSize.cxx clitkGetSizeGenericFilter.cxx ${clitkGetSize_GGO_C}) -TARGET_LINK_LIBRARIES(clitkGetSize clitkCommon ITKIO) - -WRAP_GGO(clitkGetSpacing_GGO_C clitkGetSpacing.ggo) -ADD_EXECUTABLE(clitkGetSpacing clitkGetSpacing.cxx clitkGetSpacingGenericFilter.cxx ${clitkGetSpacing_GGO_C}) -TARGET_LINK_LIBRARIES(clitkGetSpacing clitkCommon ITKIO) - -WRAP_GGO(clitkSetSpacing_GGO_C clitkSetSpacing.ggo) -ADD_EXECUTABLE(clitkSetSpacing clitkSetSpacing.cxx clitkSetSpacingGenericFilter.cxx ${clitkSetSpacing_GGO_C}) -TARGET_LINK_LIBRARIES(clitkSetSpacing clitkCommon ITKIO) - -WRAP_GGO(clitkCombineImage_GGO_C clitkCombineImage.ggo) -ADD_EXECUTABLE(clitkCombineImage clitkCombineImage.cxx clitkCombineImageGenericFilter.cxx ${clitkCombineImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkCombineImage clitkCommon ITKIO) - -WRAP_GGO(clitkPermuteAxes_GGO_C clitkPermuteAxes.ggo) -ADD_EXECUTABLE(clitkPermuteAxes clitkPermuteAxes.cxx clitkPermuteAxesGenericFilter.cxx ${clitkPermuteAxes_GGO_C}) -TARGET_LINK_LIBRARIES(clitkPermuteAxes clitkCommon ITKIO) - -WRAP_GGO(clitkChangeImageOrientation_GGO_C clitkChangeImageOrientation.ggo) -ADD_EXECUTABLE(clitkChangeImageOrientation clitkChangeImageOrientation.cxx clitkChangeImageOrientationGenericFilter.cxx ${clitkChangeImageOrientation_GGO_C}) -TARGET_LINK_LIBRARIES(clitkChangeImageOrientation clitkCommon ITKIO) - -WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo) -ADD_EXECUTABLE(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C}) -TARGET_LINK_LIBRARIES(clitkVFConvert ITKBasicFilters ITKIO clitkCommon ) - -WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo) -ADD_EXECUTABLE(clitkImageToVectorImage clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkImageToVectorImage clitkCommon ITKIO) - -WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo) -ADD_EXECUTABLE(clitkVectorImageToImage clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C}) -TARGET_LINK_LIBRARIES(clitkVectorImageToImage clitkCommon ITKIO) - -WRAP_GGO(clitkBSplineCoefficientsToValues_GGO_C clitkBSplineCoefficientsToValues.ggo) -ADD_EXECUTABLE(clitkBSplineCoefficientsToValues clitkBSplineCoefficientsToValues.cxx clitkBSplineCoefficientsToValuesGenericFilter.cxx ${clitkBSplineCoefficientsToValues_GGO_C}) -TARGET_LINK_LIBRARIES(clitkBSplineCoefficientsToValues clitkCommon ITKIO) - -WRAP_GGO(clitkValuesToBSplineCoefficients_GGO_C clitkValuesToBSplineCoefficients.ggo) -ADD_EXECUTABLE(clitkValuesToBSplineCoefficients clitkValuesToBSplineCoefficients.cxx clitkValuesToBSplineCoefficientsGenericFilter.cxx ${clitkValuesToBSplineCoefficients_GGO_C}) -TARGET_LINK_LIBRARIES(clitkValuesToBSplineCoefficients clitkCommon ITKIO) - + WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo) + ADD_EXECUTABLE(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkFlipImage clitkCommon ITKIO) + + WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo) + ADD_EXECUTABLE(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkMirrorPadImage clitkCommon ITKIO) + + WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo) + ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon ITKIO) + + WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo) + ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageStatistics clitkCommon ITKIO ITKStatistics) + + WRAP_GGO(clitkSetOrigin_GGO_C clitkSetOrigin.ggo) + ADD_EXECUTABLE(clitkSetOrigin clitkSetOrigin.cxx clitkSetOriginGenericFilter.cxx ${clitkSetOrigin_GGO_C}) + TARGET_LINK_LIBRARIES(clitkSetOrigin clitkCommon ITKIO ) + + WRAP_GGO(clitkGetOrigin_GGO_C clitkGetOrigin.ggo) + ADD_EXECUTABLE(clitkGetOrigin clitkGetOrigin.cxx clitkGetOriginGenericFilter.cxx ${clitkGetOrigin_GGO_C}) + TARGET_LINK_LIBRARIES(clitkGetOrigin clitkCommon ITKIO ) + + WRAP_GGO(clitkGetDirection_GGO_C clitkGetDirection.ggo) + ADD_EXECUTABLE(clitkGetDirection clitkGetDirection.cxx clitkGetDirectionGenericFilter.cxx ${clitkGetDirection_GGO_C}) + TARGET_LINK_LIBRARIES(clitkGetDirection clitkCommon ITKIO) + + WRAP_GGO(clitkSetDirection_GGO_C clitkSetDirection.ggo) + ADD_EXECUTABLE(clitkSetDirection clitkSetDirection.cxx clitkSetDirectionGenericFilter.cxx ${clitkSetDirection_GGO_C}) + TARGET_LINK_LIBRARIES(clitkSetDirection clitkCommon ITKIO) + + WRAP_GGO(clitkGetSize_GGO_C clitkGetSize.ggo) + ADD_EXECUTABLE(clitkGetSize clitkGetSize.cxx clitkGetSizeGenericFilter.cxx ${clitkGetSize_GGO_C}) + TARGET_LINK_LIBRARIES(clitkGetSize clitkCommon ITKIO) + + WRAP_GGO(clitkGetSpacing_GGO_C clitkGetSpacing.ggo) + ADD_EXECUTABLE(clitkGetSpacing clitkGetSpacing.cxx clitkGetSpacingGenericFilter.cxx ${clitkGetSpacing_GGO_C}) + TARGET_LINK_LIBRARIES(clitkGetSpacing clitkCommon ITKIO) + + WRAP_GGO(clitkSetSpacing_GGO_C clitkSetSpacing.ggo) + ADD_EXECUTABLE(clitkSetSpacing clitkSetSpacing.cxx clitkSetSpacingGenericFilter.cxx ${clitkSetSpacing_GGO_C}) + TARGET_LINK_LIBRARIES(clitkSetSpacing clitkCommon ITKIO) + + WRAP_GGO(clitkCombineImage_GGO_C clitkCombineImage.ggo) + ADD_EXECUTABLE(clitkCombineImage clitkCombineImage.cxx clitkCombineImageGenericFilter.cxx ${clitkCombineImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkCombineImage clitkCommon ITKIO) + + WRAP_GGO(clitkPermuteAxes_GGO_C clitkPermuteAxes.ggo) + ADD_EXECUTABLE(clitkPermuteAxes clitkPermuteAxes.cxx clitkPermuteAxesGenericFilter.cxx ${clitkPermuteAxes_GGO_C}) + TARGET_LINK_LIBRARIES(clitkPermuteAxes clitkCommon ITKIO) + + WRAP_GGO(clitkChangeImageOrientation_GGO_C clitkChangeImageOrientation.ggo) + ADD_EXECUTABLE(clitkChangeImageOrientation clitkChangeImageOrientation.cxx clitkChangeImageOrientationGenericFilter.cxx ${clitkChangeImageOrientation_GGO_C}) + TARGET_LINK_LIBRARIES(clitkChangeImageOrientation clitkCommon ITKIO) + + WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo) + ADD_EXECUTABLE(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C}) + TARGET_LINK_LIBRARIES(clitkVFConvert ITKBasicFilters ITKIO clitkCommon ) + + WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo) + ADD_EXECUTABLE(clitkImageToVectorImage clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImageToVectorImage clitkCommon ITKIO) + + WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo) + ADD_EXECUTABLE(clitkVectorImageToImage clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C}) + TARGET_LINK_LIBRARIES(clitkVectorImageToImage clitkCommon ITKIO) + + WRAP_GGO(clitkBSplineCoefficientsToValues_GGO_C clitkBSplineCoefficientsToValues.ggo) + ADD_EXECUTABLE(clitkBSplineCoefficientsToValues clitkBSplineCoefficientsToValues.cxx clitkBSplineCoefficientsToValuesGenericFilter.cxx ${clitkBSplineCoefficientsToValues_GGO_C}) + TARGET_LINK_LIBRARIES(clitkBSplineCoefficientsToValues clitkCommon ITKIO) + + WRAP_GGO(clitkValuesToBSplineCoefficients_GGO_C clitkValuesToBSplineCoefficients.ggo) + ADD_EXECUTABLE(clitkValuesToBSplineCoefficients clitkValuesToBSplineCoefficients.cxx clitkValuesToBSplineCoefficientsGenericFilter.cxx ${clitkValuesToBSplineCoefficients_GGO_C}) + TARGET_LINK_LIBRARIES(clitkValuesToBSplineCoefficients clitkCommon ITKIO) +ENDIF(CLITK_BUILD_TOOLS) diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 41f3b64..40d69e8 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -74,7 +74,8 @@ SET(vv_SRCS vvToolExtractLung.cxx vvToolPlastimatch.cxx # vvToolConnectedComponentLabeling.cxx - ) +) + #========================================================= #========================================================= @@ -210,7 +211,14 @@ 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 TOOLS_GGOS SEGMENTATION_GGOS) +TARGET_LINK_LIBRARIES(vv clitkDicomRTStruct +#Libs for generic filters with long compilation times +clitkImageConvertLib +clitkImageResampleLib +#Libs for _ggo.c files +clitkSegmentationGgoLib clitkToolsGgoLib +clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid) #=========================================================