]> Creatis software - bbtk.git/commitdiff
Feature #1889
authorcervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Fri, 18 Jan 2013 10:10:41 +0000 (11:10 +0100)
committercervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Fri, 18 Jan 2013 10:10:41 +0000 (11:10 +0100)
kernel/cmake/BBTKConfigurePackage.cmake
packages/gdcmvtk/CMakeLists.txt
packages/gdcmvtk/PackageConfig.cmake.in
packages/gdcmvtk/src/CMakeLists.txt
packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx

index 83cc430bf52178a1eebaee1ccef7a9838aabfcf3..8604a812b1c2b1276d8376c4598660d0a00ee22e 100644 (file)
@@ -142,6 +142,17 @@ IF(${BBTK_PACKAGE_NAME}_USE_ITK)
     ${${BBTK_PACKAGE_NAME}_LIBS}
     ${ITK_LIBRARIES}
     )
+
+       #Need to add additional gdcm  libraries provided by system
+       IF(WIN32)
+               IF(USE_GDCM2)
+                       SET(${BBTK_PACKAGE_NAME}_LIBS
+                               ${${BBTK_PACKAGE_NAME}_LIBS}
+                                vtkgdcm gdcmIOD gdcmMSFF gdcmexpat gdcmCommon gdcmMEXD gdcmDSED gdcmDICT 
+                                       gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 socketxx gdcmopenjpeg gdcmcharls 
+                               )
+               ENDIF()
+       ENDIF(WIN32)
 ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK)
 
 IF(${BBTK_PACKAGE_NAME}_USE_QT)
@@ -162,6 +173,7 @@ IF(${BBTK_PACKAGE_NAME}_USE_GDCM)
     ${${BBTK_PACKAGE_NAME}_LIBS}
     ${GDCM_LIBRARIES}
     )
+       message(FATAL_ERROR "GDCM2 library" ${GDCM_LIBRARIES})
        IF(USE_GDCM)
                IF(USE_GDCM2)
                message(FATAL_ERROR "You cannot select both GDCM and GDCM2 (DICOM library readers)")
@@ -174,10 +186,20 @@ ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM)
 IF(${BBTK_PACKAGE_NAME}_USE_GDCM2)
   SET(USE_GDCM2 ON CACHE BOOL "Use GDCM2" FORCE)
   SET(USE_GDCM2_VTK ON CACHE BOOL "Use GDCM2_VTK" FORCE)
-  SET(${BBTK_PACKAGE_NAME}_LIBS
-    ${${BBTK_PACKAGE_NAME}_LIBS}
-    ${GDCM2_LIBRARIES}
-    )
+  #For some reasons GDCM_LIBRARY is not defined for gdcm2 in windows
+  IF(WIN32)
+       SET(${BBTK_PACKAGE_NAME}_LIBS
+               ${${BBTK_PACKAGE_NAME}_LIBS}
+               vtkgdcm gdcmIOD gdcmMSFF gdcmexpat gdcmCommon gdcmMEXD gdcmDSED gdcmDICT 
+               gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 socketxx gdcmopenjpeg gdcmcharls 
+               )
+  ELSE(WIN32)
+       SET(${BBTK_PACKAGE_NAME}_LIBS
+               ${${BBTK_PACKAGE_NAME}_LIBS}
+               ${GDCM_LIBRARY}
+               )
+       ENDIF(WIN32)
+               
        IF(USE_GDCM2)
                IF(USE_GDCM)
                message(FATAL_ERROR "You cannot select both GDCM and GDCM2 (DICOM library readers)")
index d28951bfd1e67ac424b0e152ad74dc518810e5c9..a0878263c005c7889e6900c3fec6ad7c5d79a229 100644 (file)
@@ -154,13 +154,12 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS
   )
 #===========================================================================
 
-#===========================================================================
+IF(USE_GDCM)
 SET(${BBTK_PACKAGE_NAME}_LIBS 
-  # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST
-  # EXCEPT : the same libs than for INCLUDE_DIRS
    vtkgdcm
-  )
-#===========================================================================
+   )
+ENDIF(USE_GDCM)
+
 
 
 #===========================================================================
index f41eef5e9eaf29c283fba6ff03d17cc617e38ab2..f682910f01e4aba713afd08b11848b51e5d908b3 100644 (file)
@@ -41,6 +41,8 @@ SET(@BBTK_PACKAGE_NAME@_MINOR_VERSION @BBTK_PACKAGE_MINOR_VERSION@)
 SET(@BBTK_PACKAGE_NAME@_BUILD_VERSION @BBTK_PACKAGE_BUILD_VERSION@)
 SET(@BBTK_PACKAGE_NAME@_INCLUDE_DIRS  @BBTK_PACKAGE_INCLUDE_DIRS@)
 SET(@BBTK_PACKAGE_NAME@_LIBS          @BBTK_PACKAGE_LIBS@)
+
+
 # A BBTK PACKAGE NEEDS BBTK
 FIND_PACKAGE(BBTK REQUIRED)
 # BBTK Package configuration file inclusion
index 651c9f97c5171bb092b6f7d66b5849fece1857be..b18ebf6aa9b842af2b71aa00098001fb9885bc63 100644 (file)
@@ -26,7 +26,8 @@
 #---------------------------------------------------------------------------
 # Include src configuration cmake script
 INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_src.cmake)
-#EED 6Mars2010
+
+
 add_dependencies(bb${BBTK_PACKAGE_NAME} bbfy)
 #---------------------------------------------------------------------------
 
index f9512461cf5b1a3b34aee2fbaed2126cabe6b214..50dea74200da26e88a6ded11c07e2f199f75fa99 100644 (file)
@@ -165,7 +165,7 @@ void GetInfoGdcmReader::Process()
 void GetInfoGdcmReader::bbUserSetDefaultValues()
 {
 #if defined USE_GDCM2
-   read=NULL;
+   reader=NULL;
 #endif   
 #if defined USE_GDCM
    reader=NULL;