X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FCMakeLists.txt;h=3bfe9dff3d737d055944cec77874395f3ab88a5e;hb=783500a9fc085bb14bff81a95a76f84eea8b177a;hp=3da91cb472830062063fb25a902ea6c7378a3d6e;hpb=9eff8367f6f7d0095eaa424e6dfd15c07dcc7b64;p=clitk.git diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 3da91cb..3bfe9df 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,12 @@ + +#========================================================= +IF (CLITK_USE_SYSTEM_GDCM) + FIND_PACKAGE(GDCM REQUIRED) + SET(ITK_LIBRARIES ${ITK_LIBRARIES} gdcmDICT gdcmMSFF) +ENDIF() + + +#========================================================= # Add Libraries used in vv and clitk to avoid recompilation WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo) ADD_LIBRARY(clitkCropImageLib clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C}) @@ -11,6 +20,9 @@ ADD_LIBRARY(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx ${clitkBin WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo) ADD_LIBRARY(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx ${clitkImageArithm_GGO_C}) +WRAP_GGO(clitkVectorArithm_GGO_C clitkVectorArithm.ggo) +ADD_LIBRARY(clitkVectorArithmLib clitkVectorArithmGenericFilter.cxx ${clitkVectorArithm_GGO_C}) + WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo) ADD_LIBRARY(clitkResampleImageLib clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C}) @@ -24,6 +36,10 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo) ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C}) TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon ${ITK_LIBRARIES}) + # set_target_properties(clitkDicomInfo + # PROPERTIES + # LINK_INTERFACE_LIBRARIES "" + # ) SET(TOOLS_INSTALL clitkDicomInfo) WRAP_GGO(clitkDicom2Image_GGO_C clitkDicom2Image.ggo) @@ -54,6 +70,11 @@ IF (CLITK_BUILD_TOOLS) TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon ${ITK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFResample) + WRAP_GGO(clitkVFInterpolate_GGO_C clitkVFInterpolate.ggo) + ADD_EXECUTABLE(clitkVFInterpolate clitkVFInterpolate.cxx clitkVFInterpolateGenericFilter.cxx ${clitkVFInterpolate_GGO_C}) + TARGET_LINK_LIBRARIES(clitkVFInterpolate clitkCommon ${ITK_LIBRARIES}) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFInterpolate) + WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo) ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C}) TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon ${ITK_LIBRARIES}) @@ -87,13 +108,13 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo) ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C}) - TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ${ITK_LIBRARIES} ) + TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ${ITK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkInvertVF) WRAP_GGO(clitkAffineTransform_GGO_C clitkAffineTransform.ggo) ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C}) TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon ${ITK_LIBRARIES} ) - SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAffineTransform) WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo) ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C}) @@ -109,6 +130,10 @@ IF (CLITK_BUILD_TOOLS) TARGET_LINK_LIBRARIES(clitkImageArithm clitkImageArithmImageLib clitkCommon ${ITK_LIBRARIES} ) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageArithm) + ADD_EXECUTABLE(clitkVectorArithm clitkVectorArithm.cxx) + TARGET_LINK_LIBRARIES(clitkVectorArithm clitkVectorArithmLib clitkCommon ${ITK_LIBRARIES} ) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorArithm) + WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo) ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C}) TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon ${ITK_LIBRARIES} ) @@ -143,6 +168,12 @@ IF (CLITK_BUILD_TOOLS) TARGET_LINK_LIBRARIES(clitkDicomRTStruct2Image clitkDicomRTStruct clitkCommon ${ITK_LIBRARIES} ) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTStruct2Image) + IF(CLITK_USE_SYSTEM_GDCM) + WRAP_GGO(clitkImage2DicomRTStruct_GGO_C clitkImage2DicomRTStruct.ggo) + ADD_EXECUTABLE(clitkImage2DicomRTStruct clitkImage2DicomRTStruct.cxx ${clitkImage2DicomRTStruct_GGO_C}) + TARGET_LINK_LIBRARIES(clitkImage2DicomRTStruct clitkDicomRTStruct clitkCommon ${ITK_LIBRARIES} ${CLITK_GDCM_LIBRARIES}) + ENDIF() + WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo) ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C}) TARGET_LINK_LIBRARIES(clitkComposeVF ${ITK_LIBRARIES} clitkCommon) @@ -155,7 +186,7 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo) ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C}) - TARGET_LINK_LIBRARIES(clitkBackProjectImage ${ITK_LIBRARIES} clitkCommon ) + TARGET_LINK_LIBRARIES(clitkBackProjectImage clitkCommon ${ITK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBackProjectImage) ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx ${clitkCropImage_GGO_C}) @@ -180,7 +211,7 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo) ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C}) TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon ${ITK_LIBRARIES}) - SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageMoment) WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo) ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C}) @@ -208,9 +239,14 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkTransformLandmarks_GGO_C clitkTransformLandmarks.ggo) ADD_EXECUTABLE(clitkTransformLandmarks clitkTransformLandmarks.cxx ${clitkTransformLandmarks_GGO_C}) - TARGET_LINK_LIBRARIES(clitkTransformLandmarks clitkCommon ${ITK_LIBRARIES}) + TARGET_LINK_LIBRARIES(clitkTransformLandmarks clitkCommon ${ITK_LIBRARIES} ${VTK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks) + WRAP_GGO(clitkMaskLandmarks_GGO_C clitkMaskLandmarks.ggo) + ADD_EXECUTABLE(clitkMaskLandmarks clitkMaskLandmarks.cxx ${clitkMaskLandmarks_GGO_C}) + TARGET_LINK_LIBRARIES(clitkMaskLandmarks clitkCommon ${ITK_LIBRARIES}) + SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMaskLandmarks) + ADD_EXECUTABLE(clitkMakeSphereImage clitkMakeSphereImage.cxx) # clitkLineProfileGenericFilter.cxx ${clitkLineProfile_GGO_C}) TARGET_LINK_LIBRARIES(clitkMakeSphereImage clitkCommon ${ITK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMakeSphereImage) @@ -230,15 +266,10 @@ IF (CLITK_BUILD_TOOLS) TARGET_LINK_LIBRARIES(clitkCatImage clitkCommon ${ITK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCatImage) - WRAP_GGO(clitkCoeffsToDVF_GGO_C clitkCoeffsToDVF.ggo) - ADD_EXECUTABLE(clitkCoeffsToDVF clitkCoeffsToDVF.cxx ${clitkCoeffsToDVF_GGO_C}) - TARGET_LINK_LIBRARIES(clitkCoeffsToDVF clitkCommon ${ITK_LIBRARIES}) - SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCoeffsToDVF) - IF(CLITK_EXPERIMENTAL) WRAP_GGO(clitkBinaryImageToMesh_GGO_C clitkBinaryImageToMesh.ggo) ADD_EXECUTABLE(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C}) - TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh ${ITK_LIBRARIES} ${VTK_LIBRARIES}) + TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh itksys ${ITK_LIBRARIES} ${VTK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh) WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo) @@ -248,12 +279,12 @@ IF (CLITK_BUILD_TOOLS) WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo) ADD_EXECUTABLE(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C}) - TARGET_LINK_LIBRARIES(clitkMeshViewer ${VTK_LIBRARIES}) + TARGET_LINK_LIBRARIES(clitkMeshViewer ${ITK_LIBRARIES} ${VTK_LIBRARIES}) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer) ENDIF(CLITK_EXPERIMENTAL) IF(ITK_VERSION_MAJOR VERSION_LESS 4) - MESSAGE(WARNING "clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be build.") + MESSAGE("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.") ELSE(ITK_VERSION_MAJOR VERSION_LESS 4) WRAP_GGO(clitkDicomRTPlan2Gate_GGO_C clitkDicomRTPlan2Gate.ggo) ADD_EXECUTABLE(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c) @@ -261,7 +292,6 @@ IF (CLITK_BUILD_TOOLS) SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTPlan2Gate) ENDIF(ITK_VERSION_MAJOR VERSION_LESS 4) - SET_TARGET_PROPERTIES(${TOOLS_INSTALL} PROPERTIES INSTALL_RPATH "${VTK_DIR}:${ITK_DIR}" ) INSTALL (TARGETS ${TOOLS_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ENDIF(CLITK_BUILD_TOOLS)