mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 10:36:15 +00:00
t/openxr: Fix build without OpenGL
This commit is contained in:
parent
4fc8d3dbea
commit
47710e0532
|
@ -91,7 +91,7 @@ cmake_dependent_option(BUILD_WITH_RS "Enable RealSense device driver" ON "realse
|
|||
option(BUILD_WITH_DUMMY "Enable dummy driver" ON)
|
||||
cmake_dependent_option(BUILD_WITH_VIVE "Enable Vive driver" ON "ZLIB_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_OPENHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_SDL2 "Enable SDL2 based test application" ON "SDL2_FOUND" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_SDL2 "Enable SDL2 based test application" ON "SDL2_FOUND AND BUILD_WITH_OPENGL" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_DAYDREAM "Enable Bluetooth LE via DBUS" ON "BUILD_WITH_DBUS" OFF)
|
||||
cmake_dependent_option(BUILD_WITH_ARDUINO "Enable Arduino input device with BLE via DBUS" ON "BUILD_WITH_DBUS" OFF)
|
||||
|
||||
|
|
|
@ -24,15 +24,23 @@ add_library(${RUNTIME_TARGET} MODULE
|
|||
${SOURCE_FILES}
|
||||
)
|
||||
|
||||
# Note: Order matters in this list!
|
||||
# Note: Order may matter in these lists!
|
||||
target_link_libraries(${RUNTIME_TARGET} PUBLIC
|
||||
aux_vk
|
||||
aux_os
|
||||
aux_ogl
|
||||
aux_util
|
||||
aux_math
|
||||
)
|
||||
|
||||
if(BUILD_WITH_OPENGL)
|
||||
target_link_libraries(${RUNTIME_TARGET} PUBLIC aux_ogl)
|
||||
endif()
|
||||
if(BUILD_WITH_SDL2)
|
||||
target_link_libraries(${RUNTIME_TARGET} PUBLIC st_gui imgui_impl_sdl)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${RUNTIME_TARGET} PUBLIC
|
||||
st_oxr
|
||||
st_gui
|
||||
st_prober
|
||||
target_lists
|
||||
target_instance
|
||||
|
@ -40,10 +48,6 @@ target_link_libraries(${RUNTIME_TARGET} PUBLIC
|
|||
comp_client
|
||||
)
|
||||
|
||||
if(BUILD_WITH_SDL2)
|
||||
target_link_libraries(${RUNTIME_TARGET} PUBLIC imgui_impl_sdl)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
# Force the main "negotiate" symbol's inclusion
|
||||
# and use a version script to ensure that's the only one we expose.
|
||||
|
|
|
@ -14,10 +14,6 @@
|
|||
#include "util/u_debug.h"
|
||||
|
||||
#include "os/os_threading.h"
|
||||
#include "ogl/ogl_api.h"
|
||||
|
||||
#include "gui/gui_common.h"
|
||||
#include "gui/gui_imgui.h"
|
||||
|
||||
|
||||
struct xrt_instance;
|
||||
|
@ -40,6 +36,11 @@ oxr_sdl2_hack_stop(void **hack)
|
|||
|
||||
#else
|
||||
|
||||
#include "ogl/ogl_api.h"
|
||||
|
||||
#include "gui/gui_common.h"
|
||||
#include "gui/gui_imgui.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
DEBUG_GET_ONCE_BOOL_OPTION(gui, "OXR_DEBUG_GUI", false)
|
||||
|
|
Loading…
Reference in a new issue