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/NDOF.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/cmake/NDOF.cmake') diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 24fb23a0e3..4e93c1f9ca 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -8,9 +8,8 @@ add_library( ll::ndof INTERFACE IMPORTED ) if (NDOF) if (WINDOWS OR DARWIN) - if (NOT USESYSTEMLIBS) - use_prebuilt_binary(libndofdev) - elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)) + #use_prebuilt_binary(libndofdev) + if (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/libndofdev_installed OR NOT ${libndofdev_installed} EQUAL 0)) file(DOWNLOAD https://github.com/secondlife/3p-libndofdev/archive/refs/tags/v0.1.8e9edc7.tar.gz ${CMAKE_BINARY_DIR}/3p-libndofdev-0.1.8e9edc7.tar.gz @@ -42,7 +41,7 @@ if (NDOF) ) file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}") endif (${LIBNDOFDEV_RESULT}) - endif (NOT USESYSTEMLIBS) + endif () elseif (LINUX) use_prebuilt_binary(open-libndofdev) endif (WINDOWS OR DARWIN) -- cgit v1.2.3 From 793bdbf972eca4c032813d6e2c4ef4e79d1628eb Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 May 2025 10:48:20 +0800 Subject: Empty CMake elses & endifs parentheses to make it more flexible the next time a value in the if's parentheses gets changed again, and also to reduce duplicate pattern matches when grepping those CMake files with certain keywords. --- indra/cmake/NDOF.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake/NDOF.cmake') diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 4e93c1f9ca..d6e5e53ac9 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -40,7 +40,7 @@ if (NDOF) DESTINATION ${ARCH_PREBUILT_DIRS_RELEASE} ) file(WRITE ${PREBUILD_TRACKING_DIR}/libndofdev_installed "${libndofdev_installed}") - endif (${LIBNDOFDEV_RESULT}) + endif () endif () elseif (LINUX) use_prebuilt_binary(open-libndofdev) -- cgit v1.2.3