ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
ENDIF()
#=========================================================
+
+
+#=========================================================
+### Check if ITK was compiled with SYSTEM_GDCM = ON
+SET(CLITK_USE_SYSTEM_GDCM FALSE)
+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")
+ SET(GDCM_INCLUDE_INSTALL ".*include/gdcm-.*")
+ SET(GDCM_INCLUDE_BUILD ".*/Source/MediaStorageAndFileFormat")
+ IF(NOT ITKGDCM_INCLUDE_DIRS MATCHES ${GDCM_INCLUDE_BUILD})
+ SET(CLITK_USE_SYSTEM_GDCM TRUE)
+ ENDIF()
+ENDIF(ITK_VERSION_MAJOR LESS "4")
+
+#DD(CLITK_USE_SYSTEM_GDCM)
+