From f5ab6e11f13699c03a696611f67f8384434130a1 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 May 2025 10:22:54 +0800 Subject: Not rely on (LL_)USESYSTEMLIBS macro & CMake setting but the fact that we keep on using as many system libraries as we can (and only resort to other sources in certain cases), hasn't changed, of course. Also stop having to set USE_AUTOBUILD_3P to OFF. Lines are reindented, and when a system library can be found for a dependency, then that should be the way. If later we find out that using some other way is better, than stick to that. So, one option at a time, whichever is best for the situation. GLEXT hasn't been used, and in order to be not having to hack its .cmake file, we bypass it and refer to GLH (which is still used) right away in LLWindow. CMake commands that need to be bypassed, if it's a one-liner then it's just commented out, but if it's multiple lines, then scope them with if (FALSE) to minimise difference. --- indra/cmake/LLWindow.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake/LLWindow.cmake') diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 31907d31df..00bf0b8ef7 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -1,13 +1,13 @@ # -*- cmake -*- include(Variables) -include(GLEXT) +include(GLH) include(Prebuilt) include_guard() add_library( ll::SDL INTERFACE IMPORTED ) -if (USESYSTEMLIBS AND NOT (WINDOWS OR DARWIN)) +if (NOT (WINDOWS OR DARWIN)) include(FindPkgConfig) pkg_check_modules(Sdl2 REQUIRED sdl2) target_compile_definitions( ll::SDL INTERFACE LL_SDL=1) -- cgit v1.2.3 From bdc8a1845666565c5e30228d7d57532df339bc94 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 May 2025 10:57:30 +0800 Subject: Lose the not really required double quotes on the CMake string match tests. --- indra/cmake/LLWindow.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/cmake/LLWindow.cmake') diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 00bf0b8ef7..34df3ad33b 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -13,14 +13,13 @@ if (NOT (WINDOWS OR DARWIN)) 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}) - if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + if (LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) list(APPEND Sdl2_LIBRARIES X11) endif () target_link_libraries(ll::SDL INTERFACE ${Sdl2_LIBRARIES}) return () endif () - if (LINUX) #Must come first as use_system_binary can exit this file early target_compile_definitions( ll::SDL INTERFACE LL_SDL_VERSION=2 LL_SDL) -- cgit v1.2.3