forked from johan-andruejol/AirwaySegmenter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (29 loc) · 944 Bytes
/
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
project(AirwaySegmenter)
cmake_minimum_required(VERSION 2.8)
#Find packages
find_package(SlicerExecutionModel REQUIRED)
include(${SlicerExecutionModel_USE_FILE})
find_package(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
find_package(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})
IF (ITK_VERSION_MAJOR VERSION_LESS "4")
FATAL_ERROR("ITK version must be at least 4.0 ")
ENDIF()
#Testing
OPTION(BUILD_TESTING "Build tests." ON)
IF(BUILD_TESTING)
INCLUDE(CTest)
SET(TEMP "${CMAKE_BINARY_DIR}/Temp")
ENDIF()
#Compatibility between slicer and the executable
SET(SLICER_ITK_DIFFERENT true CACHE BOOL "Check if compiling with a different ITK than slicer")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/CMake/AirwaySegmenterConfig.h.in
${CMAKE_BINARY_DIR}/AirwaySegmenterConfig.h)
include_directories(Code)
#Finally the project
SEMMacroBuildCLI(
NAME ${PROJECT_NAME}
TARGET_LIBRARIES ${ITK_LIBRARIES} ${VTK_LIBRAIRIES}
EXECUTABLE_ONLY
)