-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
53 lines (42 loc) · 2.11 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
cmake_minimum_required(VERSION 3.4.0)
cmake_policy(VERSION 2.8.9)
set(LOCAL_PROJECT_NAME DTIPrepTools)
set(PRIMARY_PROJECT_NAME DTIPrepTools)#for External_DCMTK.cmake
project(${LOCAL_PROJECT_NAME})
#-----------------------------------------------------------------------------
# Superbuild Option - Enabled by default
# Phase I: ${LOCAL_PROJECT_NAME}_SUPERBUILD is set to ON, and the
# supporting packages defined in "SuperBuild.cmake"
# are built. The last package in "SuperBuild.cmake"
# to be built is a recursive call to this
# file with ${LOCAL_PROJECT_NAME}_SUPERBUILD explicitly
# set to "OFF" to initiate Phase II
#
# Phase II: Build the ${LOCAL_PROJECT_NAME}, referencing the support
# packages built in Phase I.
#-----------------------------------------------------------------------------
option(${LOCAL_PROJECT_NAME}_SUPERBUILD "Build ${LOCAL_PROJECT_NAME} and the projects it depends on via SuperBuild.cmake." ON)
mark_as_advanced(${LOCAL_PROJECT_NAME}_SUPERBUILD)
#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH
${${PROJECT_NAME}_SOURCE_DIR}/CMake
${${PROJECT_NAME}_BINARY_DIR}/CMake
${CMAKE_MODULE_PATH}
)
include(SlicerExtensionsConfigureMacros)
option(STATIC_${LOCAL_PROJECT_NAME} "Build static ${LOCAL_PROJECT_NAME}" ON)
option(${LOCAL_PROJECT_NAME}_USE_QT "Use Qt" ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake)
#-----------------------------------------------------------------------------
# Superbuild script
#-----------------------------------------------------------------------------
if(${LOCAL_PROJECT_NAME}_SUPERBUILD)
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
else()
include("${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_PROJECT_NAME}.cmake")
return()
endif()
message(FATAL_ERROR "You should never reach this point !")