From: tbaudier Date: Wed, 4 Jul 2018 11:40:34 +0000 (+0200) Subject: Add Option to use external GDCM X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f6c9b46ceb3aad0f9b31b67ee6d079fd498f9c73;p=clitk.git Add Option to use external GDCM The previous test does not work with ITK > 4.13 at least --- diff --git a/cmake/build_opt.cmake b/cmake/build_opt.cmake index 54a3531..ff66917 100644 --- a/cmake/build_opt.cmake +++ b/cmake/build_opt.cmake @@ -22,6 +22,8 @@ option(CLITK_EXPERIMENTAL "Enable experimental software and features" OFF) mark_as_advanced(CLITK_EXPERIMENTAL) option(CLITK_MEMORY_INFO "Enable memory info (need libstatgrab >= v.0.90)" OFF) mark_as_advanced(CLITK_MEMORY_INFO) +option(CLITK_EXTERNAL_GDCM "Enable features using external GDCM" OFF) +mark_as_advanced(CLITK_EXTERNAL_GDCM) option(CLITK_BUILD_TOOLS "Build command-line tools" OFF) option(CLITK_BUILD_SEGMENTATION "Build command-line segmentation tools" OFF) option(CLITK_BUILD_REGISTRATION "Build command-line registration tools" OFF) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 868a2b6..25b613b 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -60,11 +60,11 @@ endif() #========================================================= -### Check if ITK was compiled with SYSTEM_GDCM = ON +### Check if ITK was compiled with SYSTEM_GDCM = ON (Not possible anymore with ITK 4.13) +### Add option to activate external GDCM in clitk set(CLITK_USE_SYSTEM_GDCM FALSE) -# ITK4 creates a target for each gdcm library when it compiles GDCM -get_target_property(GDCMDICTTARG gdcmDICT TYPE ) -if(NOT GDCMDICTTARG) +if(CLITK_EXTERNAL_GDCM) + message("Be sure to use external GDCM with ITK") set(CLITK_USE_SYSTEM_GDCM TRUE) endif()