-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
59 lines (46 loc) · 1.74 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
# This is the root ITK CMakeLists file.
cmake_minimum_required(VERSION 2.8.9)
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
endif()
#set(ITK_DIR /Users/hauke/src/itk/InsightToolkit-4.8.1/bin)
#set(ITK_DIR /Users/hauke/src/itk/InsightToolkit-5.0.0/bin)
if (EXISTS "/Users/hauke/src/itk/InsightToolkit-5.0.0/bin")
set(ITK_DIR /Users/hauke/src/itk/InsightToolkit-5.0.0/bin)
else()
set(ITK_DIR /opt/InsightToolkit-5.0.1/bin)
endif()
IF(UNIX AND NOT APPLE)
set(LINUX TRUE)
message(STATUS ">>> Linux")
ELSE()
message(STATUS ">>> MacOS")
ENDIF()
#SET(CMAKE_CXX_FLAGS "-std=c++0x")
IF(LINUX)
SET(CMAKE_CXX_FLAGS "-std=c++11")
ELSE()
# find the correct path for isysroot with `xcrun --show-sdk-path`
SET(CMAKE_CXX_FLAGS "-std=c++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include")
ENDIF()
project(LungSegmentation)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR "Cannot build ITKApps without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
# Boost
set(boost_min_ver 1.50.0)
set(boost_libs system filesystem timer date_time)
find_package(Boost ${boost_min_ver})
if(Boost_FOUND)
find_package(Boost ${boost_min_ver} COMPONENTS ${boost_libs})
endif()
#target_link_libraries(your_target ${Boost_LIBRARIES})
add_executable(LungSegmentation LungSegmentation.cxx )
target_link_libraries(LungSegmentation ${ITK_LIBRARIES} ${Boost_LIBRARIES})
add_executable(MaskRegistration MaskRegistration.cxx )
target_link_libraries(MaskRegistration ${ITK_LIBRARIES} ${Boost_LIBRARIES})
add_executable(FakeLungVolumes FakeLungVolumes.cxx )
target_link_libraries(FakeLungVolumes ${ITK_LIBRARIES} ${Boost_LIBRARIES})