summaryrefslogtreecommitdiff
path: root/indra/cmake/LLWindow.cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-08-21 16:25:38 +0800
committerErik Kundiman <erik@megapahit.org>2023-08-21 16:25:38 +0800
commit99e4f282ba8df6dcaa3032fa1bfbb5f88884d9a6 (patch)
tree43d40b7f1d7d44c0386de94ef7f29165772259c5 /indra/cmake/LLWindow.cmake
parentb8e727b023876c34ae3b1fca0f598c8b2dbe4bcd (diff)
Darwin & any platform can, and should, use SDL
The alt mouse click to cam is broken for now on macOS, but this is the path we've chosen.
Diffstat (limited to 'indra/cmake/LLWindow.cmake')
-rw-r--r--indra/cmake/LLWindow.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 09b8fdb83d..8cb383d718 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -7,13 +7,16 @@ include(Prebuilt)
include_guard()
add_library( ll::SDL INTERFACE IMPORTED )
-if (NOT (USE_AUTOBUILD_3P OR USE_CONAN) AND NOT DARWIN)
+if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(Sdl2 REQUIRED sdl2)
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
target_include_directories(ll::SDL SYSTEM INTERFACE ${Sdl2_INCLUDE_DIRS})
target_link_directories(ll::SDL INTERFACE ${Sdl2_LIBRARY_DIRS})
- target_link_libraries(ll::SDL INTERFACE ${Sdl2_LIBRARIES} X11)
+ if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ list(APPEND Sdl2_LIBRARIES X11)
+ endif ()
+ target_link_libraries(ll::SDL INTERFACE ${Sdl2_LIBRARIES})
return ()
endif ()