The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/gui: Refactor out GUI state tracker into a re-usable base

Split the GUI state tracker into a base and the rest of the GUI that was used
to make the monado-gui project. This greatly reduces the number of dependancies
brought into a minimal gui target and as such makes it easier to re-use.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2399>

+38 -12
+2
doc/changes/state_trackers/mr.2399.md
··· 1 + gui: Refactor GUI state tracker into a base that can be more easily re-used 2 + and that brings in fewer dependencies.
+4 -1
src/xrt/auxiliary/util/CMakeLists.txt
··· 1 1 # Copyright 2019-2024, Collabora, Ltd. 2 + # Copyright 2024-2025, NVIDIA CORPORATION. 2 3 # SPDX-License-Identifier: BSL-1.0 3 4 4 5 #### ··· 187 188 endif() 188 189 189 190 if(XRT_HAVE_SDL2) 190 - target_link_libraries(aux_util_debug_gui PRIVATE st_gui xrt-external-imgui-sdl2) 191 + target_link_libraries( 192 + aux_util_debug_gui PRIVATE st_gui_base xrt-external-imgui-sdl2 193 + ) 191 194 192 195 if(XRT_BUILD_DRIVER_QWERTY) 193 196 target_link_libraries(
+32 -11
src/xrt/state_trackers/gui/CMakeLists.txt
··· 1 1 # Copyright 2019-2024, Collabora, Ltd. 2 + # Copyright 2024-2025, NVIDIA CORPORATION. 2 3 # SPDX-License-Identifier: BSL-1.0 3 4 4 5 # c-imgui doesn't do well with IPO - lots of warnings. 5 6 set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF) 6 7 8 + ### 9 + # Base GUI 7 10 add_library( 8 - st_gui STATIC 11 + st_gui_base STATIC 9 12 gui_common.h 10 13 gui_imgui.h 11 14 gui_ogl.c 12 15 gui_ogl.h 13 16 gui_ogl_sink.c 14 - gui_prober.c 15 17 gui_scene.cpp 16 - gui_scene_calibrate.c 17 18 gui_scene_debug.c 18 - gui_scene_hand_tracking_demo.c 19 - gui_scene_record_euroc.c 20 - gui_scene_main_menu.c 21 - gui_scene_record.c 22 - gui_scene_resampler_test.c 23 - gui_scene_remote.c 24 - gui_scene_video.c 25 - gui_scene_tracking_overrides.c 26 19 gui_stb.c 27 20 gui_widget_native_images.c 28 21 gui_widget_native_images.h 29 22 gui_window_record.c 30 23 gui_window_record.h 31 24 ) 25 + target_link_libraries( 26 + st_gui_base 27 + PRIVATE 28 + xrt-external-stb 29 + aux_util 30 + aux_util_sink 31 + aux_os 32 + aux_ogl 33 + xrt-external-imgui 34 + ) 35 + target_include_directories(st_gui_base INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) 32 36 37 + ### 38 + # Main GUI 39 + add_library( 40 + st_gui STATIC 41 + gui_prober.c 42 + gui_scene_calibrate.c 43 + gui_scene_hand_tracking_demo.c 44 + gui_scene_main_menu.c 45 + gui_scene_record.c 46 + gui_scene_record_euroc.c 47 + gui_scene_remote.c 48 + gui_scene_resampler_test.c 49 + gui_scene_tracking_overrides.c 50 + gui_scene_video.c 51 + ) 33 52 target_link_libraries( 34 53 st_gui 35 54 PRIVATE ··· 38 57 aux_util_sink 39 58 aux_os 40 59 aux_ogl 60 + st_gui_base 41 61 drv_includes 42 62 xrt-external-imgui 43 63 ) 44 64 target_include_directories(st_gui INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/..) 45 65 46 66 if(XRT_HAVE_GST) 67 + target_link_libraries(st_gui_base PRIVATE aux_gstreamer) 47 68 target_link_libraries(st_gui PRIVATE aux_gstreamer) 48 69 endif() 49 70