-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathCMakeLists.txt
129 lines (112 loc) · 5.81 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
126
127
128
129
cmake_minimum_required(VERSION 3.5)
#-----------------------------------------------------------------------------
set(EXTENSION_NAME SlicerRT)
# ------------------------------------------------------------------------
set(SLICERRT_VERSION_MAJOR "1")
set(SLICERRT_VERSION_MINOR "0")
set(SLICERRT_VERSION_PATCH "0")
set(SLICERRT_VERSION ${SLICERRT_VERSION_MAJOR}.${SLICERRT_VERSION_MINOR}.${SLICERRT_VERSION_PATCH})
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "https://slicerrt.org")
set(EXTENSION_CATEGORY "Radiotherapy")
set(EXTENSION_CONTRIBUTORS "Csaba Pinter (PerkLab, Queen's University), Andras Lasso (PerkLab, Queen's University), Greg Sharp (Massachusetts General Hospital), Kevin Wang (Radiation Medicine Program, Princess Margaret Hospital, University Health Network Toronto)")
set(EXTENSION_DESCRIPTION "Toolkit for radiation therapy research. Features include DICOM-RT import/export, dose volume histogram, dose accumulation, external beam planning (TPS), structure comparison, isodose line/surface generation, etc. Version ${SLICERRT_VERSION}")
set(EXTENSION_ICONURL "https://www.slicer.org/slicerWiki/images/2/29/SlicerRT_Logo_3.0_128x128.png")
set(EXTENSION_SCREENSHOTURLS "https://www.slicer.org/slicerWiki/images/8/87/SlicerRT_0.10_IsocenterShiftingEvaluation.png https://www.slicer.org/slicerWiki/images/e/ef/SlicerRT_0.11_ProstateLoaded_Beams_ThresholdedDose.png https://www.slicer.org/slicerWiki/images/4/40/SlicerRtFundingSources.png")
set(EXTENSION_STATUS "Beta")
set(EXTENSION_DEPENDS "NA") # Specified as a space separated list or 'NA' if any
set(EXTENSION_BUILD_SUBDIRECTORY inner-build)
set(SUPERBUILD_TOPLEVEL_PROJECT inner)
# Prevent unnecessary re-linking on Linux
#
# See https://discourse.slicer.org/t/build-when-git-commit-is-changed/29607/12
#
# For example, on Linux, after modifying one implementation file
#
# $ touch ../../SlicerRT/SlicerRtCommon/vtkSlicerRtCommon.cxx
#
# We can observe that beside the rebuilding of libvtkSlicerRtCommon.so no relinking
# happen for any of the dependencies:
#
# $ make
# [...]
# [ 1%] Building CXX object SlicerRtCommon/CMakeFiles/vtkSlicerRtCommon.dir/vtkSlicerRtCommon.cxx.o
# [ 1%] Linking CXX shared library ../lib/Slicer-5.3/qt-loadable-modules/libvtkSlicerRtCommon.so
# [ 2%] Built target vtkSlicerRtCommon
# [ 2%] Built target vtkSlicerRtCommonHierarchy
# [ 4%] Built target vtkSlicerRtCommonPython
# [...]
# [100%] Built target CompileIGRTWorkflow_SelfTestPythonFiles
#
if(NOT DEFINED CMAKE_LINK_DEPENDS_NO_SHARED AND UNIX AND NOT APPLE)
set(CMAKE_LINK_DEPENDS_NO_SHARED ON)
endif()
#-----------------------------------------------------------------------------
# Extension dependencies
find_package(Slicer COMPONENTS ConfigurePrerequisites REQUIRED)
project(SlicerRT)
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
mark_as_superbuild(Slicer_DIR)
#-----------------------------------------------------------------------------
option(SLICERRT_ENABLE_EXPERIMENTAL_MODULES "Enable the building of work-in-progress, experimental modules." OFF)
mark_as_superbuild(SLICERRT_ENABLE_EXPERIMENTAL_MODULES)
#-----------------------------------------------------------------------------
# SuperBuild setup
option(${EXTENSION_NAME}_SUPERBUILD "Build ${EXTENSION_NAME} and the projects it depends on." ON)
mark_as_advanced(${EXTENSION_NAME}_SUPERBUILD)
if(${EXTENSION_NAME}_SUPERBUILD)
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
endif()
#-----------------------------------------------------------------------------
# Plastimatch_DIR is only used now by experimental modules. Print the
# Plastimatch_DIR, to avoid the warning "Manually-specified variables were not
# used by the project: Plastimatch_DIR" warning
message(STATUS "Plastimatch_DIR: " ${Plastimatch_DIR} )
message(STATUS "SLICERRT_ENABLE_EXPERIMENTAL_MODULES: " ${SLICERRT_ENABLE_EXPERIMENTAL_MODULES} )
#-----------------------------------------------------------------------------
add_subdirectory(SlicerRtCommon)
add_subdirectory(PlmCommon)
add_subdirectory(Beams)
add_subdirectory(Isodose)
add_subdirectory(PlanarImage)
add_subdirectory(DicomRtImportExport)
add_subdirectory(DoseAccumulation)
add_subdirectory(DoseVolumeHistogram)
add_subdirectory(DvhComparison)
add_subdirectory(DoseComparison)
add_subdirectory(SegmentComparison)
add_subdirectory(ExternalBeamPlanning)
add_subdirectory(PlmProtonDoseEngine)
add_subdirectory(VffFileReader)
add_subdirectory(DosxyzNrc3dDoseFileReader)
add_subdirectory(DicomSroImportExport)
add_subdirectory(BatchProcessing)
add_subdirectory(RoomsEyeView)
add_subdirectory(DrrImageComputation)
add_subdirectory(PlastimatchPy)
add_subdirectory(PlmBspline)
add_subdirectory(PlmDrr)
add_subdirectory(PlmLandwarp)
add_subdirectory(PlmRegister)
if (SLICERRT_ENABLE_EXPERIMENTAL_MODULES)
# In development
add_subdirectory(PlmThreshbox)
add_subdirectory(PinnacleDvfReader)
# Registration validation routines
add_subdirectory(PlmSynth)
add_subdirectory(PlmVectorFieldAnalysis)
endif()
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
#-----------------------------------------------------------------------------
set(EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS)
list(APPEND EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS "${vtkIECTransformLogic_DIR};vtkIECTransformLogic;RuntimeLibraries;/")
set(${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS "${EXTENSION_CPACK_INSTALL_CMAKE_PROJECTS}" CACHE STRING "List of external projects to install" FORCE)
list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
list(APPEND CPACK_INSTALL_CMAKE_PROJECTS "${${EXTENSION_NAME}_CPACK_INSTALL_CMAKE_PROJECTS}")
include(${Slicer_EXTENSION_GENERATE_CONFIG})
include(${Slicer_EXTENSION_CPACK})