diff --git a/src/xrt/targets/gui/CMakeLists.txt b/src/xrt/targets/gui/CMakeLists.txt index fe2483a7e..2cc5c774c 100644 --- a/src/xrt/targets/gui/CMakeLists.txt +++ b/src/xrt/targets/gui/CMakeLists.txt @@ -27,8 +27,12 @@ target_link_libraries(gui PRIVATE st_gui target_instance_no_comp imgui_impl_sdl + ${SDL2_LIBRARIES} + ) +target_include_directories(gui PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${SDL2_INCLUDE_DIRS} ) -target_include_directories(gui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..) install(TARGETS gui RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 37b7f440a..a2a950228 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -35,8 +35,16 @@ target_link_libraries(${RUNTIME_TARGET} PUBLIC if(XRT_HAVE_OPENGL) target_link_libraries(${RUNTIME_TARGET} PUBLIC aux_ogl) endif() + if(XRT_HAVE_SDL2) - target_link_libraries(${RUNTIME_TARGET} PUBLIC st_gui imgui_impl_sdl) + target_link_libraries(${RUNTIME_TARGET} PRIVATE + st_gui + imgui_impl_sdl + ${SDL2_LIBRARIES} + ) + target_include_directories(${RUNTIME_TARGET} PRIVATE + ${SDL2_INCLUDE_DIRS} + ) endif() if(XRT_FEATURE_SERVICE)