-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
90 lines (79 loc) · 1.99 KB
/
CMakeLists.txt
File metadata and controls
90 lines (79 loc) · 1.99 KB
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
cmake_minimum_required(VERSION 3.8...3.12 FATAL_ERROR)
project(CaveInteraction)
find_package(VTK
COMPONENTS
CommonColor
CommonCore
CommonDataModel
IOImage
FiltersSources
InteractionStyle
RenderingContextOpenGL2
RenderingCore
RenderingFreeType
RenderingGL2PSOpenGL2
RenderingOpenGL2
RenderingOpenVR
RenderingOpenXR
InfovisCore
RenderingVolume
GUISupportQt
RenderingVolumeOpenGL2
ViewsQt
ChartsCore
RenderingContext2D
ViewsContext2D
IOGeometry
IOPLY)
if (NOT VTK_FOUND)
message("Skipping example: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif ()
find_package("Qt${VTK_QT_VERSION}" COMPONENTS Widgets Gui)
if (NOT TARGET "Qt${VTK_QT_VERSION}::Widgets" OR NOT TARGET "Qt${VTK_QT_VERSION}::Gui")
message("Skipping example: ${Qt${VTK_QT_VERSION}_NOT_FOUND_MESSAGE}")
return ()
endif ()
# Set your files and resources here
set(Srcs
GUIManager.cxx
main.cxx
Renderer.cxx
CaveInteractorStyle.cxx
CaveLogger.cxx
Evaluation.cxx
SynchronizeWindows.cxx)
set(Hdrs
GUIManager.h
Renderer.h
CaveInteractorStyle.h
CaveLogger.h
Evaluation.h
SynchronizeWindows.h)
set(UIs
SimpleView.ui)
set(QRCs
Icons/icons.qrc)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
source_group("Resources" FILES
${UIs}
${QRCs})
add_executable(CaveInteraction MACOSX_BUNDLE
${Srcs} ${Hdrs} ${UIs} ${QRCs})
target_link_libraries(CaveInteraction
PRIVATE
${VTK_LIBRARIES}
"Qt${VTK_QT_VERSION}::Gui"
"Qt${VTK_QT_VERSION}::Widgets")
# Set the output directory for the executable
set_target_properties(CaveInteraction PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
# Copy the 'action_manifests' folder into the bin directory after the build
add_custom_command(TARGET CaveInteraction POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/action_manifests $<TARGET_FILE_DIR:CaveInteraction>/action_manifests
)