-
Notifications
You must be signed in to change notification settings - Fork 43
/
CMakeLists.txt
57 lines (42 loc) · 1.78 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
cmake_minimum_required(VERSION 2.6)
if(COMMAND cmake_policy)
# policy settings ...
cmake_policy(SET CMP0003 NEW)
if(POLICY CMP0022)
cmake_policy(SET CMP0022 OLD)
endif()
endif(COMMAND cmake_policy)
PROJECT(IRTK)
OPTION(USE_VXL "Use VXL library instead of Numerical Recipes" OFF)
IF (USE_VXL)
SUBDIRS(vxl)
# INCLUDE_DIRECTORIES(${VCL_INCLUDE_DIR} ${VXLCORE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${IRTK_SOURCE_DIR}/vxl/core ${IRTK_SOURCE_DIR}/vxl/vcl)
ADD_DEFINITIONS(-DUSE_VXL)
ENDIF (USE_VXL)
OPTION(BUILD_WITH_TBB "Use TBB library for multithreading support" OFF)
OPTION(BUILD_GPU_SUPPORT_WITH_CUDA "Use a preliminary GPU accelerated version of IRTK" OFF)
IF (BUILD_GPU_SUPPORT_WITH_CUDA)
add_subdirectory(cudaCommon++)
add_subdirectory(packages/segmentation/src/irtkReconstructionCuda)
ENDIF(BUILD_GPU_SUPPORT_WITH_CUDA)
SUBDIRS(common++/src geometry++/src image++/src contrib++/src applications packages documentation wrapping)
INCLUDE(${IRTK_SOURCE_DIR}/config/IRTKInclude.cmake)
OPTION(BUILD_TESTS "Build units tests" ON)
IF (BUILD_TESTS)
MESSAGE("-- Unit tests enabled")
ADD_SUBDIRECTORY (test)
ENDIF(BUILD_TESTS)
SET(EXECUTABLE_OUTPUT_PATH ${IRTK_BINARY_DIR}/bin CACHE STRING
"Where to put the executables")
SET(LIBRARY_OUTPUT_PATH ${IRTK_BINARY_DIR}/lib CACHE STRING
"Where to put the libraries")
IF (BUILD_WITH_NIFTI)
SUBDIRS(nifti)
ENDIF (BUILD_WITH_NIFTI)
CONFIGURE_FILE(${IRTK_SOURCE_DIR}/config/IRTKInclude.cmake
${IRTK_BINARY_DIR}/lib/IRTKInclude.cmake)
CONFIGURE_FILE(${IRTK_SOURCE_DIR}/InstallerScripts/irtkInstaller.sh
${IRTK_BINARY_DIR}/bin/irtkInstaller.sh)
EXEC_PROGRAM(chmod ${IRTK_BINARY_DIR}/bin ARGS +x;irtkInstaller.sh)
INCLUDE(${IRTK_SOURCE_DIR}/config/IRTKGenerateConfigFile.cmake)