find_package(ITK)
if(ITK_FOUND)
include("${ITK_USE_FILE}")
+ if(ITK_VERSION VERSION_GREATER 5.0.0 OR ITK_VERSION VERSION_EQUAL 5.0.0)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif(ITK_VERSION VERSION_GREATER 5.0.0 OR ITK_VERSION VERSION_EQUAL 5.0.0)
else(ITK_FOUND)
message(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
endif(ITK_FOUND)
#=========================================================
-### 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)
-if(ITK_VERSION_MAJOR LESS "4")
- if(ITK_USE_SYSTEM_GDCM)
- set(CLITK_USE_SYSTEM_GDCM TRUE)
- endif(ITK_USE_SYSTEM_GDCM)
-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()
+if(CLITK_EXTERNAL_GDCM)
+ message("Be sure to use external GDCM with ITK")
+ set(CLITK_USE_SYSTEM_GDCM TRUE)
endif()
+