]> Creatis software - clitk.git/commitdiff
Robust detection of GDCM compilation by ITK: made it robust to ITK installation
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 9 Dec 2013 20:55:01 +0000 (21:55 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 9 Dec 2013 20:55:01 +0000 (21:55 +0100)
cmake/dependencies.cmake

index 1ba42ec4568fb48fc16e9525c3e74f16578e6bba..2bd9f8219852174e552e474621d400b9ab210776 100644 (file)
@@ -64,9 +64,10 @@ IF(ITK_VERSION_MAJOR LESS "4")
     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})
+  FIND_PATH(GDCMDEFSPATH
+      "gdcmDefs.h"
+      PATHS ${ITK_INCLUDE_DIRS})
+  IF(${GDCMDEFSPATH} MATCHES "GDCMDEFSPATH-NOTFOUND")
     SET(CLITK_USE_SYSTEM_GDCM TRUE)
   ENDIF()
 ENDIF(ITK_VERSION_MAJOR LESS "4")