This repository has been archived by the owner on May 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
92 lines (77 loc) · 2.9 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
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8.7)
include(ExternalProject)
#-----------------------------------------------------------------------------
set(MODULE_NAME "PerkEvaluator")
set(MODULE_TITLE "Perk Evaluator")
string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
#-----------------------------------------------------------------------------
if ( NOT DEFINED ${EXTENSION_NAME}_SUPERBUILD )
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
endif()
#-----------------------------------------------------------------------------
add_subdirectory(MRML)
add_subdirectory(Logic)
add_subdirectory(Widgets)
#-----------------------------------------------------------------------------
set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")
# Current_{source,binary} and Slicer_{Libs,Base} already included
set(MODULE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/MRML
${CMAKE_CURRENT_BINARY_DIR}/MRML
${CMAKE_CURRENT_SOURCE_DIR}/Logic
${CMAKE_CURRENT_BINARY_DIR}/Logic
${CMAKE_CURRENT_SOURCE_DIR}/Widgets
${CMAKE_CURRENT_BINARY_DIR}/Widgets
${qSlicerTransformRecorderModuleWidgets_SOURCE_DIR}
${qSlicerTransformRecorderModuleWidgets_BINARY_DIR}
${vtkSlicerTransformRecorderModuleLogic_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleLogic_BINARY_DIR}
${vtkSlicerTransformRecorderModuleMRML_SOURCE_DIR}
${vtkSlicerTransformRecorderModuleMRML_BINARY_DIR}
)
set(MODULE_SRCS
qSlicer${MODULE_NAME}Module.cxx
qSlicer${MODULE_NAME}Module.h
qSlicer${MODULE_NAME}ModuleWidget.cxx
qSlicer${MODULE_NAME}ModuleWidget.h
qSlicerMetricScriptReader.cxx
qSlicerMetricScriptReader.h
)
set(MODULE_MOC_SRCS
qSlicer${MODULE_NAME}Module.h
qSlicer${MODULE_NAME}ModuleWidget.h
qSlicerMetricScriptReader.h
)
set(MODULE_UI_SRCS
Resources/UI/qSlicer${MODULE_NAME}Module.ui
)
set(MODULE_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleLogic
vtkSlicer${MODULE_NAME}ModuleMRML
qSlicer${MODULE_NAME}ModuleWidgets
vtkSlicerTransformRecorderModuleMRML
vtkSlicerTransformRecorderModuleLogic
qSlicerTransformRecorderModuleWidgets
)
#-----------------------------------------------------------------------------
set(MODULE_RESOURCES
Resources/qSlicer${MODULE_NAME}Module.qrc
)
#-----------------------------------------------------------------------------
slicerMacroBuildQtModule(
NAME ${MODULE_NAME}
TITLE ${MODULE_TITLE}
EXPORT_DIRECTIVE ${MODULE_EXPORT_DIRECTIVE}
INCLUDE_DIRECTORIES ${MODULE_INCLUDE_DIRECTORIES}
SRCS ${MODULE_SRCS}
MOC_SRCS ${MODULE_MOC_SRCS}
UI_SRCS ${MODULE_UI_SRCS}
TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
RESOURCES ${MODULE_RESOURCES}
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()