The open source OpenXR runtime
0
fork

Configure Feed

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

t/openxr: Fix build without OpenGL

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
47710e05 4fc8d3db

+17 -12
+1 -1
CMakeLists.txt
··· 91 91 option(BUILD_WITH_DUMMY "Enable dummy driver" ON) 92 92 cmake_dependent_option(BUILD_WITH_VIVE "Enable Vive driver" ON "ZLIB_FOUND" OFF) 93 93 cmake_dependent_option(BUILD_WITH_OPENHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF) 94 - cmake_dependent_option(BUILD_WITH_SDL2 "Enable SDL2 based test application" ON "SDL2_FOUND" OFF) 94 + cmake_dependent_option(BUILD_WITH_SDL2 "Enable SDL2 based test application" ON "SDL2_FOUND AND BUILD_WITH_OPENGL" OFF) 95 95 cmake_dependent_option(BUILD_WITH_DAYDREAM "Enable Bluetooth LE via DBUS" ON "BUILD_WITH_DBUS" OFF) 96 96 cmake_dependent_option(BUILD_WITH_ARDUINO "Enable Arduino input device with BLE via DBUS" ON "BUILD_WITH_DBUS" OFF) 97 97
+11 -7
src/xrt/targets/openxr/CMakeLists.txt
··· 24 24 ${SOURCE_FILES} 25 25 ) 26 26 27 - # Note: Order matters in this list! 27 + # Note: Order may matter in these lists! 28 28 target_link_libraries(${RUNTIME_TARGET} PUBLIC 29 29 aux_vk 30 30 aux_os 31 - aux_ogl 32 31 aux_util 33 32 aux_math 33 + ) 34 + 35 + if(BUILD_WITH_OPENGL) 36 + target_link_libraries(${RUNTIME_TARGET} PUBLIC aux_ogl) 37 + endif() 38 + if(BUILD_WITH_SDL2) 39 + target_link_libraries(${RUNTIME_TARGET} PUBLIC st_gui imgui_impl_sdl) 40 + endif() 41 + 42 + target_link_libraries(${RUNTIME_TARGET} PUBLIC 34 43 st_oxr 35 - st_gui 36 44 st_prober 37 45 target_lists 38 46 target_instance 39 47 comp_main 40 48 comp_client 41 49 ) 42 - 43 - if(BUILD_WITH_SDL2) 44 - target_link_libraries(${RUNTIME_TARGET} PUBLIC imgui_impl_sdl) 45 - endif() 46 50 47 51 if(NOT MSVC) 48 52 # Force the main "negotiate" symbol's inclusion
+5 -4
src/xrt/targets/openxr/oxr_sdl2_hack.c
··· 14 14 #include "util/u_debug.h" 15 15 16 16 #include "os/os_threading.h" 17 - #include "ogl/ogl_api.h" 18 - 19 - #include "gui/gui_common.h" 20 - #include "gui/gui_imgui.h" 21 17 22 18 23 19 struct xrt_instance; ··· 39 35 {} 40 36 41 37 #else 38 + 39 + #include "ogl/ogl_api.h" 40 + 41 + #include "gui/gui_common.h" 42 + #include "gui/gui_imgui.h" 42 43 43 44 #include <SDL2/SDL.h> 44 45