From 69ca7b4f56b0873c4446859655712091b44e6434 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Sat, 4 Jan 2014 16:23:43 +0100 Subject: [PATCH] Detect ITK_USE_SYSTEM_GDCM with target --- cmake/dependencies.cmake | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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() -- 2.47.1