]> Creatis software - clitk.git/commitdiff
Include lib gdcm in each subfolder
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Tue, 4 Jun 2013 14:43:00 +0000 (16:43 +0200)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Tue, 4 Jun 2013 14:43:00 +0000 (16:43 +0200)
common/CMakeLists.txt
registration/CMakeLists.txt
segmentation/CMakeLists.txt
tools/CMakeLists.txt

index 59a459ad50aad1efaacd29ae348a7685ffc1eb9e..c64d06b72d1734fb05abfbfcc7daaba52e8b3f93 100644 (file)
@@ -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)
index 1bf1bf5796824bcb03dda629fd1f898580f7a618..e54632d60a3d5b9df4860c16fef6dec10223ada0 100644 (file)
@@ -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)
 #=========================================================
 
index 7e635ddf9332386f97d8678b2c33bd65f5a2aaeb..8638d10175c3c0fff41932585d395ea44deb1158 100644 (file)
@@ -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
index e9f8f1e28a77d200f8bf9c5c4fc93371ae70208c..3bfe9dff3d737d055944cec77874395f3ab88a5e 100644 (file)
@@ -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})