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/FreeType.cmake | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/cmake/FreeType.cmake') diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index 7683fe364a..d5c7891032 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -5,14 +5,13 @@ include(Linking) include_guard() add_library( ll::freetype INTERFACE IMPORTED ) -if (USESYSTEMLIBS) - include(FindPkgConfig) - pkg_check_modules(Freetype REQUIRED freetype2) - target_include_directories( ll::freetype SYSTEM INTERFACE ${Freetype_INCLUDE_DIRS} ) - target_link_directories( ll::freetype INTERFACE ${Freetype_LIBRARY_DIRS} ) - target_link_libraries( ll::freetype INTERFACE ${Freetype_LIBRARIES} ) - return () -endif (USESYSTEMLIBS) +include(FindPkgConfig) +pkg_check_modules(Freetype REQUIRED freetype2) +target_include_directories( ll::freetype SYSTEM INTERFACE ${Freetype_INCLUDE_DIRS} ) +target_link_directories( ll::freetype INTERFACE ${Freetype_LIBRARY_DIRS} ) +target_link_libraries( ll::freetype INTERFACE ${Freetype_LIBRARIES} ) +return () + use_system_binary(freetype) use_prebuilt_binary(freetype) target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) -- cgit v1.2.3