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()