From: Simon Rit Date: Sat, 4 Jan 2014 15:23:43 +0000 (+0100) Subject: Detect ITK_USE_SYSTEM_GDCM with target X-Git-Tag: v1.4.0~147 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=69ca7b4f56b0873c4446859655712091b44e6434;p=clitk.git Detect ITK_USE_SYSTEM_GDCM with target --- diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 2bd9f82..7091fff 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -63,14 +63,11 @@ IF(ITK_VERSION_MAJOR LESS "4") IF(ITK_USE_SYSTEM_GDCM) SET(CLITK_USE_SYSTEM_GDCM TRUE) ENDIF(ITK_USE_SYSTEM_GDCM) -ELSE(ITK_VERSION_MAJOR LESS "4") - FIND_PATH(GDCMDEFSPATH - "gdcmDefs.h" - PATHS ${ITK_INCLUDE_DIRS}) - IF(${GDCMDEFSPATH} MATCHES "GDCMDEFSPATH-NOTFOUND") +ELSE() + # ITK4 creates a target for each gdcm library when it compiles GDCM + get_target_property(GDCMDICTTARG gdcmDICT TYPE ) + IF(NOT GDCMDICTTARG) SET(CLITK_USE_SYSTEM_GDCM TRUE) ENDIF() -ENDIF(ITK_VERSION_MAJOR LESS "4") - -#DD(CLITK_USE_SYSTEM_GDCM) +ENDIF()