Hi, MITK developers,
Recently I updated ITK to version 3.10 and GDCM to 2.0.10 and compiled with
ITK_USE_SYSTEM_GDCM:ON, and find that MITK will not link due to library
dependency.
When add the corresponding lines to CMakeLists.txt like that in ITK
CMakeLists.txt
it works.
OPTION(MITK_USE_SYSTEM_GDCM "Use an outside build of GDCM." OFF)
MARK_AS_ADVANCED(MITK_USE_SYSTEM_GDCM)
IF(MITK_USE_SYSTEM_GDCM)
FIND_PACKAGE(GDCM)
IF(GDCM_FOUND)
INCLUDE(${GDCM_USE_FILE})
IF( "${GDCM_MAJOR_VERSION}" LESS 2.0 )
SET(MITK_GDCM_LIBRARIES gdcm)
ELSE( "${GDCM_MAJOR_VERSION}" LESS 2.0 )
SET(MITK_GDCM_LIBRARIES gdcmMSFF)
ENDIF( "${GDCM_MAJOR_VERSION}" LESS 2.0 )
ELSE(GDCM_FOUND)
MESSAGE(FATAL_ERROR "Must set GDCM_DIR for MITK_USE_SYSTEM_GDCM.")
ENDIF(GDCM_FOUND)
ELSE(MITK_USE_SYSTEM_GDCM)
SET(MITK_GDCM_LIBRARIES itkgdcm)
SET(GDCM_INCLUDE_DIR
${ITK_SOURCE_DIR}/Utilities/gdcm/src
)
ENDIF(MITK_USE_SYSTEM_GDCM)
A better method is to check ITK configuration to check if ITK use system
GDCM or not
and load corresponding libraries depends.
Thanks!
Fucang
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users