-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
104 lines (89 loc) · 3.16 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
cmake_minimum_required(VERSION 3.5)
set(MODULE_NAME "OpenIGTLinkIF")
set(MODULE_TITLE "OpenIGTLink I/F")
string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
#-----------------------------------------------------------------------------
if(Slicer_SOURCE_DIR)
find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
else()
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
endif()
# --------------------------------------------------------------------------
# Check if version 2 protocol is available
# Features that depnd on OpenIGTLink Protocol 2 are only available
# if the OpenIGTLink library is compiled with OpenIGTLink_PROTOCOL_VERSION_2
# option.
#add_definitions(-DOpenIGTLinkIF_USE_VERSION_2)
#add_definitions(-DOpenIGTLinkIF_LIBRARY_VERSION="${OpenIGTLink_VERSION_MAJOR}-${OpenIGTLink_VERSION_MINOR}-${OpenIGTLink_VERSION_PATCH} for protocol ver. 2")
#-----------------------------------------------------------------------------
add_subdirectory(MRML)
add_subdirectory(Logic)
#-----------------------------------------------------------------------------
set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_OPENIGTLINKIF_EXPORT")
# Additional includes - Current_{source,binary} and Slicer_{Libs,Base} already included
set(MODULE_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/GUI
${CMAKE_CURRENT_BINARY_DIR}/GUI
${CMAKE_CURRENT_SOURCE_DIR}/Logic
${CMAKE_CURRENT_BINARY_DIR}/Logic
${CMAKE_CURRENT_SOURCE_DIR}/MRML
${CMAKE_CURRENT_BINARY_DIR}/MRML
)
set(MODULE_SRCS
qSlicerOpenIGTLinkIFModule.cxx
qSlicerOpenIGTLinkIFModule.h
qSlicerOpenIGTLinkIFModuleWidget.cxx
qSlicerOpenIGTLinkIFModuleWidget.h
GUI/qMRMLSceneIGTLConnectorModel.cxx
GUI/qMRMLSceneIGTLConnectorModel.h
GUI/qMRMLIGTLConnectorTreeView.cxx
GUI/qMRMLIGTLConnectorTreeView.h
GUI/qMRMLIGTLIOModel.cxx
GUI/qMRMLIGTLIOModel.h
GUI/qMRMLIGTLIOModel_p.h
GUI/qMRMLIGTLIOTreeView.cxx
GUI/qMRMLIGTLIOTreeView.h
GUI/qSlicerIGTLConnectorPropertyWidget.cxx
GUI/qSlicerIGTLConnectorPropertyWidget.h
GUI/qSlicerIGTLIONodeSelectorWidget.cxx
GUI/qSlicerIGTLIONodeSelectorWidget.h
)
set(MODULE_MOC_SRCS
qSlicerOpenIGTLinkIFModule.h
qSlicerOpenIGTLinkIFModuleWidget.h
GUI/qMRMLSceneIGTLConnectorModel.h
GUI/qMRMLIGTLConnectorTreeView.h
GUI/qMRMLIGTLIOModel.h
# GUI/qMRMLIGTLIOModel_p.h
GUI/qMRMLIGTLIOTreeView.h
GUI/qSlicerIGTLConnectorPropertyWidget.h
GUI/qSlicerIGTLIONodeSelectorWidget.h
)
set(MODULE_UI_SRCS
Resources/UI/qSlicerIGTLConnectorPropertyWidget.ui
Resources/UI/qSlicerIGTLIONodeSelectorWidget.ui
Resources/UI/qSlicerOpenIGTLinkIFModule.ui
)
set(MODULE_TARGET_LIBRARIES
vtkSlicerOpenIGTLinkIFModuleLogic
vtkSlicerOpenIGTLinkIFModuleMRML
)
set(MODULE_RESOURCES
Resources/qSlicerOpenIGTLinkIFModule.qrc
)
#-----------------------------------------------------------------------------
slicerMacroBuildQtModule(
NAME ${MODULE_NAME}
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()