From: David Sarrut Date: Tue, 4 Jun 2013 14:43:00 +0000 (+0200) Subject: Include lib gdcm in each subfolder X-Git-Tag: v1.4.0~222 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=783500a9fc085bb14bff81a95a76f84eea8b177a;p=clitk.git Include lib gdcm in each subfolder --- diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 59a459a..c64d06b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -63,18 +63,18 @@ ENDIF(CLITK_MEMORY_INFO) ### Set add libraries if system GDCM -#DD(CLITK_USE_SYSTEM_GDCM) IF (CLITK_USE_SYSTEM_GDCM) FIND_PACKAGE(GDCM REQUIRED) #DD(GDCM_USE_FILE) #DD(GDCM_INCLUDE_DIRS) #DD(GDCM_LIBRARY_DIRS) - #SET(CLITK_GDCM_LIBRARIES gdcmDSED) - SET(CLITK_GDCM_LIBRARIES gdcmDICT gdcmMSFF vtkgdcm) #DD(CLITK_GDCM_LIBRARIES) + #FIND_LIBRARY(A gdcmDICT ${GDCM_LIBRARY_DIRS}) + #FIND_LIBRARY(B gdcmMSFF ${GDCM_LIBRARY_DIRS}) + #FIND_LIBRARY(C vtkgdcm ${GDCM_LIBRARY_DIRS}) ENDIF() -TARGET_LINK_LIBRARIES(clitkCommon vtkCommon vtkImaging ${ITK_LIBRARIES} ${CLITK_GDCM_LIBRARIES}) +TARGET_LINK_LIBRARIES(clitkCommon vtkCommon vtkImaging ${ITK_LIBRARIES}) ADD_LIBRARY(clitkDicomRTStruct STATIC clitkDicomRT_Contour.cxx @@ -83,7 +83,11 @@ ADD_LIBRARY(clitkDicomRTStruct STATIC clitkDicomRTStruct2ImageFilter.cxx ) -TARGET_LINK_LIBRARIES(clitkDicomRTStruct vtkHybrid ${CLITK_GDCM_LIBRARIES}) +IF (CLITK_USE_SYSTEM_GDCM) + TARGET_LINK_LIBRARIES(clitkDicomRTStruct vtkHybrid vtkgdcm) +ELSE() + TARGET_LINK_LIBRARIES(clitkDicomRTStruct vtkHybrid) +ENDIF() #ADD_LIBRARY(clitkCommonShared SHARED ${clitkCommon_SRC}) #SET_TARGET_PROPERTIES(clitkCommonShared PROPERTIES COMPILE_FLAGS -fPIC) diff --git a/registration/CMakeLists.txt b/registration/CMakeLists.txt index 1bf1bf5..e54632d 100644 --- a/registration/CMakeLists.txt +++ b/registration/CMakeLists.txt @@ -1,3 +1,9 @@ +#========================================================= +IF (CLITK_USE_SYSTEM_GDCM) + FIND_PACKAGE(GDCM REQUIRED) + SET(ITK_LIBRARIES ${ITK_LIBRARIES} gdcmDICT gdcmMSFF) +ENDIF() + #ADD_LIBRARY(clitkLBGSB STATIC clitkLBGSBOptimizer.cxx) #========================================================= diff --git a/segmentation/CMakeLists.txt b/segmentation/CMakeLists.txt index 7e635dd..8638d10 100644 --- a/segmentation/CMakeLists.txt +++ b/segmentation/CMakeLists.txt @@ -1,3 +1,9 @@ +#========================================================= +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 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index e9f8f1e..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}) @@ -27,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) @@ -95,7 +108,7 @@ 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) @@ -155,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) @@ -167,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})