forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
75 lines (62 loc) · 2.04 KB
/
CMakeLists.txt
File metadata and controls
75 lines (62 loc) · 2.04 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
# Copyright CERN and copyright holders of ALICE O2. This software is
# distributed under the terms of the GNU General Public License v3 (GPL
# Version 3), copied verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/ for full licensing information.
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.
if (GLFW_FOUND)
set(MODULE_BUCKET_NAME glfw_bucket)
set(GUI_BACKEND
src/imgui_impl_glfw_gl3.cpp
src/gl3w.c
src/Sokol3DUtils.cxx
src/GL3DUtils.cxx
src/HandMade3DImpl.cxx
src/DebugGUI.cxx
)
else()
set(MODULE_BUCKET_NAME headless_bucket)
set(GUI_BACKEND
src/Dummy3DUtils.cxx
src/DummyDebugGUI.cxx
)
endif()
set(MODULE_NAME "DebugGUI")
O2_SETUP(NAME ${MODULE_NAME})
set(SRCS
src/imgui.cpp
src/imgui_draw.cpp
src/imgui_extras.cpp
${GUI_BACKEND}
)
set(HEADERS
include/DebugGUI/imconfig.h
include/DebugGUI/imgui.h
include/DebugGUI/imgui_extras.h)
set(LIBRARY_NAME ${MODULE_NAME})
set(BUCKET_NAME ${MODULE_BUCKET_NAME})
O2_GENERATE_LIBRARY()
# TODO: feature of macro, it deletes the variables we pass to it, set them again
# this has to be fixed in the macro implementation
set(LIBRARY_NAME ${MODULE_NAME})
set(BUCKET_NAME ${MODULE_BUCKET_NAME})
if (GLFW_FOUND)
O2_GENERATE_EXECUTABLE(
EXE_NAME "test_ImGUI"
SOURCES test/test_ImGUI.cpp test/imgui_demo.cpp
MODULE_LIBRARY_NAME ${LIBRARY_NAME}
BUCKET_NAME ${MODULE_BUCKET_NAME}
)
endif()
O2_GENERATE_EXECUTABLE(
EXE_NAME "test_DebugGUI_test_ImGUIHeadless"
SOURCES test/test_ImGUIHeadless.cpp test/imgui_demo.cpp
MODULE_LIBRARY_NAME ${LIBRARY_NAME}
BUCKET_NAME ${MODULE_BUCKET_NAME}
)
add_test_wrap(NAME test_DebugGUI_test_ImGUIHeadless COMMAND test_DebugGUI_test_ImGUIHeadless)
target_link_libraries(test_DebugGUI_test_ImGUIHeadless Boost::unit_test_framework)
set_tests_properties(test_DebugGUI_test_ImGUIHeadless PROPERTIES TIMEOUT 30)