diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-07-12 15:42:07 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-07-19 12:41:36 +0800 |
commit | fe29edcff99d5e69bb4cf401870f7503089cf69c (patch) | |
tree | 93a5e00cf9736d191be1614d18bfbeb05e2ed04e | |
parent | 43f332459198b40dd11f9c478ca421ab71aec27b (diff) |
Use system SDL on FreeBSD too
X11 is still required too, that's why it's still added for linking.
On Darwin, SDL is disabled for now.
-rw-r--r-- | indra/cmake/LLWindow.cmake | 10 |
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 |