From: Simon Rit Date: Mon, 9 Dec 2013 20:55:01 +0000 (+0100) Subject: Robust detection of GDCM compilation by ITK: made it robust to ITK installation X-Git-Tag: v1.4.0~152 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0e5d63f7f567452492465bf023abbd47de48fb3b;p=clitk.git Robust detection of GDCM compilation by ITK: made it robust to ITK installation --- diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 1ba42ec..2bd9f82 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -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")