-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
101 lines (76 loc) · 2.88 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# CMakeFiles.txt for the EZminc
#
# Vladimir S. FONOV - [email protected]
PROJECT(ezminc)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(BICPL_FOUND OFF)
IF(NOT MINC_TOOLKIT_BUILD)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
FIND_PACKAGE(LIBMINC REQUIRED)
FIND_PACKAGE(GSL)
FIND_PACKAGE(FFTW3F)
FIND_PACKAGE(BICPL QUIET)
FIND_PACKAGE(ITK REQUIRED)
LINK_DIRECTORIES(${ITK_LIBRARY_DIRS})
INCLUDE( ${LIBMINC_USE_FILE} )
OPTION(EZMINC_BUILD_MINCNLM "Build Non-local means denoising programm,requires GSL (protected by a license IDDN.FR.001.070033.000.S.P.2007.000.21000)" OFF)
OPTION(EZMINC_BUILD_DISTORTION_CORRECTION "Build distortion correction tools, requires GSL" OFF)
IF(HAVE_MINC1) # Right now it is needed for C++ simple minc interface
OPTION(EZMINC_BUILD_MRFSEG "Build mrfseg - tissue classification program from Jussi Tohka" OFF)
ENDIF(HAVE_MINC1)
OPTION(EZMINC_BUILD_DD "Build Diffeomorphic Demons (requires ITK)" OFF)
OPTION(EZMINC_BUILD_TOOLS "Build additional tools , requires GSL" OFF)
IF(ITK_FOUND)
IF( NOT ITK_VERSION_MAJOR VERSION_EQUAL 4 )
FIND_PACKAGE(MINC4ITK REQUIRED)
SET(HAVE_MINC4ITK ON)
ELSE( NOT ITK_VERSION_MAJOR VERSION_EQUAL 4 )
# Assume that ITK4 has built-in MINC support
SET(MINC4ITK_LIBRARY_DIRS )
SET(MINC4ITK_INCLUDE_DIRS )
SET(HAVE_MINC4ITK OFF)
ENDIF(NOT ITK_VERSION_MAJOR VERSION_EQUAL 4 )
ENDIF(ITK_FOUND)
ELSE(NOT MINC_TOOLKIT_BUILD)
SET(BICPL_FOUND ON) # Assume that minc-toolkit will provide BICPL
ENDIF(NOT MINC_TOOLKIT_BUILD)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckFunctionExists)
CHECK_FUNCTION_EXISTS(finite HAVE_FINITE)
CHECK_FUNCTION_EXISTS(isfinite HAVE_ISFINITE)
CHECK_INCLUDE_FILES(values.h HAVE_VALUES_H)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
IF(HAVE_MINC1) # Right now it is needed for C++ simple minc interface
INCLUDE_DIRECTORIES( image_proc )
ADD_SUBDIRECTORY( image_proc )
ENDIF(HAVE_MINC1)
ADD_SUBDIRECTORY( scripts )
IF(GSL_FOUND)
INCLUDE_DIRECTORIES(
${GSL_INCLUDE_DIRS}
tools
)
IF(EZMINC_BUILD_MINCNLM)
ADD_SUBDIRECTORY(mincnlm)
ENDIF(EZMINC_BUILD_MINCNLM)
ENDIF(GSL_FOUND)
IF(FFTW3F_FOUND)
INCLUDE_DIRECTORIES( ${FFTW3F_INCLUDE_DIRS})
ENDIF(FFTW3F_FOUND)
IF(EZMINC_BUILD_TOOLS )
ADD_SUBDIRECTORY(tools)
ENDIF(EZMINC_BUILD_TOOLS)
IF(GSL_FOUND AND EZMINC_BUILD_DISTORTION_CORRECTION)
ADD_SUBDIRECTORY( distortion_correction )
ENDIF(GSL_FOUND AND EZMINC_BUILD_DISTORTION_CORRECTION)
IF(EZMINC_BUILD_MRFSEG AND HAVE_MINC1)
ADD_SUBDIRECTORY(mrfseg)
ENDIF(EZMINC_BUILD_MRFSEG AND HAVE_MINC1)
IF(ITK_FOUND)
IF(EZMINC_BUILD_DD)
ADD_SUBDIRECTORY(diff_demons)
ENDIF(EZMINC_BUILD_DD)
ENDIF(ITK_FOUND)
ADD_SUBDIRECTORY(examples)