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)
35 MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
37 #=========================================================
39 #=========================================================
40 # Find gengetopt, will create a target exe if not found
41 SET(CMAKE_MODULE_PATH "${CLITK_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
42 FIND_PACKAGE(Gengetopt)
43 #=========================================================
45 #=========================================================
46 # Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
47 IF (NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
48 FIND_LIBRARY(LIBSTATGRAB NAMES statgrab PATHS)
49 IF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
50 # MESSAGE("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
51 SET(CLITK_MEMORY_INFO OFF)
52 ELSE (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
53 SET(CLITK_MEMORY_INFO ON)
54 ENDIF (${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
56 #=========================================================
59 #=========================================================
60 ### Check if ITK was compiled with SYSTEM_GDCM = ON
61 SET(CLITK_USE_SYSTEM_GDCM FALSE)
62 IF(ITK_VERSION_MAJOR LESS "4")
63 IF(ITK_USE_SYSTEM_GDCM)
64 SET(CLITK_USE_SYSTEM_GDCM TRUE)
65 ENDIF(ITK_USE_SYSTEM_GDCM)
67 # ITK4 creates a target for each gdcm library when it compiles GDCM
68 get_target_property(GDCMDICTTARG gdcmDICT TYPE )
70 SET(CLITK_USE_SYSTEM_GDCM TRUE)