1 #=========================================================
5 include("${ITK_USE_FILE}")
7 message(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
9 #=========================================================
11 #=========================================================
13 find_package(VTK REQUIRED)
15 include("${VTK_USE_FILE}")
16 if(VTK_VERSION VERSION_LESS 5.8.0)
27 endif(VTK_VERSION VERSION_LESS 5.8.0)
28 if(VTK_VERSION VERSION_LESS 5.6.0)
33 endif(VTK_VERSION VERSION_LESS 5.6.0)
34 if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
35 add_definitions(-DVTKGL2)
38 message(FATAL_ERROR "Please set VTK_DIR.")
40 #=========================================================
42 #=========================================================
43 # Find gengetopt, will create a target exe if not found
44 set(CMAKE_MODULE_PATH "${CLITK_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
45 find_package(Gengetopt)
46 #=========================================================
48 #=========================================================
49 # Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
50 #if(NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
51 # find_library(LIBSTATGRAB NAMES statgrab PATHS)
52 # if(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
53 # message("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
54 set(CLITK_MEMORY_INFO OFF)
55 # else(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
56 # set(CLITK_MEMORY_INFO ON)
57 # endif(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
59 #=========================================================
62 #=========================================================
63 ### Check if ITK was compiled with SYSTEM_GDCM = ON
64 set(CLITK_USE_SYSTEM_GDCM FALSE)
65 # ITK4 creates a target for each gdcm library when it compiles GDCM
66 get_target_property(GDCMDICTTARG gdcmDICT TYPE )
68 set(CLITK_USE_SYSTEM_GDCM TRUE)