From: cervenansky Date: Fri, 18 Jan 2013 10:10:41 +0000 (+0100) Subject: Feature #1889 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=de36a36c2266946ffed8754462981d084b8a1268;p=bbtk.git Feature #1889 --- diff --git a/kernel/cmake/BBTKConfigurePackage.cmake b/kernel/cmake/BBTKConfigurePackage.cmake index 83cc430..27fea04 100644 --- a/kernel/cmake/BBTKConfigurePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage.cmake @@ -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} ) + 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)") diff --git a/packages/gdcmvtk/CMakeLists.txt b/packages/gdcmvtk/CMakeLists.txt index d28951b..a087826 100644 --- a/packages/gdcmvtk/CMakeLists.txt +++ b/packages/gdcmvtk/CMakeLists.txt @@ -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) + #=========================================================================== diff --git a/packages/gdcmvtk/PackageConfig.cmake.in b/packages/gdcmvtk/PackageConfig.cmake.in index f41eef5..f682910 100644 --- a/packages/gdcmvtk/PackageConfig.cmake.in +++ b/packages/gdcmvtk/PackageConfig.cmake.in @@ -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 diff --git a/packages/gdcmvtk/src/CMakeLists.txt b/packages/gdcmvtk/src/CMakeLists.txt index 651c9f9..b18ebf6 100644 --- a/packages/gdcmvtk/src/CMakeLists.txt +++ b/packages/gdcmvtk/src/CMakeLists.txt @@ -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) #--------------------------------------------------------------------------- diff --git a/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx b/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx index f951246..50dea74 100644 --- a/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx +++ b/packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.cxx @@ -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;