summaryrefslogtreecommitdiff
path: root/indra/cmake/LLWindow.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/LLWindow.cmake')
-rw-r--r--indra/cmake/LLWindow.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index b36e970560..f952383a27 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -7,6 +7,16 @@ include(Prebuilt)
include_guard()
add_library( ll::SDL INTERFACE IMPORTED )
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN) AND NOT DARWIN)
+ include(FindPkgConfig)
+ pkg_check_modules(Sdl REQUIRED sdl)
+ target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
+ target_include_directories(ll::SDL SYSTEM INTERFACE ${Sdl_INCLUDE_DIRS})
+ target_link_directories(ll::SDL INTERFACE ${Sdl_LIBRARY_DIRS})
+ target_link_libraries(ll::SDL INTERFACE ${Sdl_LIBRARIES} X11)
+ return ()
+endif ()
+
if (LINUX)
#Must come first as use_system_binary can exit this file early