From 5c830f16b24702675cd0e5d2f0f16afe59d02177 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 3 Dec 2019 14:11:11 -0600 Subject: [PATCH] t/oxr: Fix linking in absence of SDL2 --- src/xrt/targets/openxr/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 59aaee97f..fb6b46e52 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -72,7 +72,6 @@ if(BUILD_WITH_SDL2) target_link_libraries(${RUNTIME_TARGET} PUBLIC ${SDL2_LIBRARIES} - X11 # HACK HACK HACK HACK ) target_sources(${RUNTIME_TARGET} PRIVATE @@ -81,6 +80,11 @@ if(BUILD_WITH_SDL2) ../../../external/imgui/imgui_impl_sdl.h ) endif() +if(BUILD_WITH_XCB AND BUILD_WITH_XLIB) + target_link_libraries(${RUNTIME_TARGET} PUBLIC + ${X11_X11_LIB} + ) +endif() include(GNUInstallDirs)