-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
125 lines (107 loc) · 4.49 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
cmake_minimum_required(VERSION 3.11)
# Enable C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(CellLocator)
# Slicer sources
include(FetchContent)
if(NOT DEFINED slicersources_SOURCE_DIR)
# Download Slicer sources and set variables slicersources_SOURCE_DIR and slicersources_BINARY_DIR
FetchContent_Populate(slicersources
GIT_REPOSITORY https://github.com/KitwareMedical/Slicer
GIT_TAG f81033d29c2f8f0373896652ebd0d9c432f2fe46 # cell-locator-v4.11.0-2021-04-01-0d7f7bad74
GIT_PROGRESS 1
)
else()
set(slicersources_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/slicersources-subbuild)
endif()
set(CMAKE_MODULE_PATH ${slicersources_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
include(SlicerInitializeOSXVariables)
# Configure Application
set(Slicer_APPLICATIONS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Applications)
set(Slicer_MAIN_PROJECT "CellLocatorApp")
# Set organization
set(Slicer_ORGANIZATION_DOMAIN "alleninstitute.org")
set(Slicer_ORGANIZATION_NAME "Allen Institute")
# Default home and favorite modules
set(Slicer_DEFAULT_HOME_MODULE "Home")
set(Slicer_DEFAULT_FAVORITE_MODULES "Data, Volumes, Models, Transforms, Markups, SegmentEditor")
# Configure SuperBuild
set(SUPERBUILD_TOPLEVEL_PROJECT Slicer)
set(EXTERNAL_PROJECT_ADDITIONAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild")
include(ExternalProjectDependency)
if(NOT CMAKE_CONFIGURATION_TYPES)
set(Slicer_DEFAULT_BUILD_TYPE "Release")
endif()
include(SlicerInitializeBuildType)
include(SlicerInitializeReleaseType)
# Slicer options
option(BUILD_TESTING "Build application test suite" OFF)
option(Slicer_BUILD_DOCUMENTATION "Build documentation (Doxygen, sphinx, ...)" OFF)
if(WIN32)
option(Slicer_BUILD_WIN32_CONSOLE "Build application executable as a console app" OFF)
endif()
option(Slicer_BUILD_CLI "Build Slicer CLI Plugins" OFF)
option(Slicer_BUILD_DICOM_SUPPORT "Build application with DICOM support" OFF)
option(Slicer_BUILD_DIFFUSION_SUPPORT "Build application with Diffusion support" OFF)
option(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT "Build application with ExtensionManager support" OFF)
option(Slicer_BUILD_MULTIVOLUME_SUPPORT "Build application with MultiVolume support" OFF)
option(Slicer_BUILD_PARAMETERSERIALIZER_SUPPORT "Build application with parameter serializer support" OFF)
option(Slicer_USE_PYTHONQT "Build application with Python support" ON)
option(Slicer_USE_PYTHONQT_WITH_TCL "Build application with Python Tcl adapter layer" OFF)
option(Slicer_USE_QtTesting "Build application with QtTesting support" OFF)
option(Slicer_USE_SimpleITK "Build application with SimpleITK support" OFF)
option(Slicer_BUILD_BRAINSTOOLS "Build application with BRAINSTools module" OFF)
option(Slicer_BUILD_DataStore "Build application with DataStore module" OFF)
option(Slicer_BUILD_CompareVolumes "Build application with ChangeTrackerPy module" OFF)
option(Slicer_BUILD_LandmarkRegistration "Build application with LandmarkRegistration module" OFF)
# Enable Slicer built-in modules
set(Slicer_CLIMODULES_ENABLED
)
set(Slicer_QTLOADABLEMODULES_ENABLED
)
set(Slicer_QTSCRIPTEDMODULES_ENABLED
)
# Disable Slicer built-in modules
set(Slicer_CLIMODULES_DISABLED
)
set(Slicer_QTLOADABLEMODULES_DISABLED
CropVolume
DoubleArrays
Plots
SceneViews
Segmentations
SlicerWelcome
Tables
ViewControllers
VolumeRendering
Sequences
)
set(Slicer_QTSCRIPTEDMODULES_DISABLED
DataProbe
DMRIInstall
Editor
EditorLib
Endoscopy
LabelStatistics
PerformanceTests
SampleData
ScreenCapture
SegmentEditor
SegmentStatistics
SurfaceToolbox
VectorToScalarVolume
)
# Enable/Disable Slicer custom modules: To create a new module, use the SlicerExtensionWizard.
set(Slicer_EXTENSION_SOURCE_DIRS
${CellLocator_SOURCE_DIR}/Modules
)
# Custom CTK
set(Slicer_CTK_GIT_REPOSITORY "${EP_GIT_PROTOCOL}://github.com/KitwareMedical/CTK.git")
set(Slicer_CTK_GIT_TAG "22d47a7cfe5b2c2c9bc354da31040deadb45ad25") # cell-locator-2021-03-29-7a515ccf
set(Slicer_ADDITIONAL_DEPENDENCIES
python-requests-requirements
)
# Add Slicer sources
add_subdirectory(${slicersources_SOURCE_DIR} ${slicersources_BINARY_DIR})