-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (53 loc) · 1.77 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
#-----------------------------------------------------------------------------
set(MODULE_NAME MyCppModule)
set(MODULE_TITLE ${MODULE_NAME})
string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
#-----------------------------------------------------------------------------
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}/Logic
${CMAKE_CURRENT_BINARY_DIR}/Logic
${CMAKE_CURRENT_SOURCE_DIR}/Widgets
${CMAKE_CURRENT_BINARY_DIR}/Widgets
)
set(MODULE_SRCS
qSlicer${MODULE_NAME}Module.cxx
qSlicer${MODULE_NAME}Module.h
qSlicer${MODULE_NAME}ModuleWidget.cxx
qSlicer${MODULE_NAME}ModuleWidget.h
)
set(MODULE_MOC_SRCS
qSlicer${MODULE_NAME}Module.h
qSlicer${MODULE_NAME}ModuleWidget.h
)
set(MODULE_UI_SRCS
Resources/UI/qSlicer${MODULE_NAME}ModuleWidget.ui
)
set(MODULE_TARGET_LIBRARIES
vtkSlicer${MODULE_NAME}ModuleLogic
qSlicer${MODULE_NAME}ModuleWidgets
)
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}
WITH_GENERIC_TESTS
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()