forked from InsightSoftwareConsortium/ITKSphinxExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
60 lines (52 loc) · 1.83 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
if(itk-module)
set(ITK_DIR ${ITK_BINARY_DIR})
if(NOT EXISTS "${ITK_DIR}/ITKConfig.cmake")
return()
endif()
endif()
find_package(ITK 5.2.0 REQUIRED)
include(${ITK_USE_FILE})
# To avoid linker issues.
# Module_ITKVtkGlue is true when building inside ITK
# ITKVtkGlue_LOADED is true when SuperBuild ITKEx stand-alone
set(ENABLE_QUICKVIEW OFF)
if(Module_ITKVtkGlue OR ITKVtkGlue_LOADED)
find_package(VTK REQUIRED)
include_directories(${VTK_INCLUDE_DIRS})
set(ENABLE_QUICKVIEW ON)
add_definitions(-DENABLE_QUICKVIEW)
endif()
if(BUILD_DOCUMENTATION)
if(NOT PYTHON_EXECUTABLE)
find_package(PythonInterp 3.6 REQUIRED)
if(NOT PYTHONINTERP_FOUND)
message(SEND_ERROR "Building the documentation requires Python")
else()
# Set here the proper version of Python required to be able to build
# tarballs for each example
set(PYTHON_REQUIRED_VERSION 3.6)
if("${PYTHON_VERSION_STRING}" VERSION_LESS ${PYTHON_REQUIRED_VERSION})
message(SEND_ERROR "Building the documentation requires Python >= ${PYTHON_REQUIRED_VERSION}: ${PYTHON_VERSION_STRING} found at ${PYTHON_EXECUTABLE}")
endif()
endif()
endif()
endif()
if(WIN32)
add_definitions(-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS)
endif()
# For comparing example outputs to their regression baseline's.
add_executable(ImageCompareCommand ImageCompareCommand.cxx)
target_link_libraries(ImageCompareCommand ${ITK_LIBRARIES})
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMake/ITKSphinxExamplesMacros.cmake)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Developer)
add_subdirectory(Bridge)
add_subdirectory(Core)
add_subdirectory(External)
add_subdirectory(Filtering)
add_subdirectory(GPU)
add_subdirectory(IO)
add_subdirectory(Numerics)
add_subdirectory(Nonunit)
add_subdirectory(Registration)
add_subdirectory(Segmentation)
add_subdirectory(Video)