From 31b81b2c059c77ad2a0d99d1e7d1ee570a885875 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Sun, 19 Oct 2025 01:27:57 +1000 Subject: [PATCH 1/2] Corrected spacing and use of tab instead of spaces --- indra/newview/CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0ddda7b3a7..84d30727db 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2515,20 +2515,20 @@ elseif (DARWIN) # otherwise occurs when upscaling the viewer to Retina resolution levels. LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -platform_version -Xlinker macos -Xlinker ${CMAKE_OSX_DEPLOYMENT_TARGET} -Xlinker 10.12" - # We can only do these if building with Havok + # We can only do these if building with Havok ) - if(HAVOK OR HAVOK_TPV) - set_target_properties(${VIEWER_BINARY_NAME} - PROPERTIES - # arch specific flags for universal builds: https://stackoverflow.com/a/77942065 - XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL" - XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB" - # only generate the .MAP file for llphysicsextensions_tpv on x86_64 - XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$,$,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" - XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensionsstub/$,$,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub" - ) - endif() - # + if(HAVOK OR HAVOK_TPV) + set_target_properties(${VIEWER_BINARY_NAME} + PROPERTIES + # arch specific flags for universal builds: https://stackoverflow.com/a/77942065 + XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL" + XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB" + # only generate the .MAP file for llphysicsextensions_tpv on x86_64 + XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$,$,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" + XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensionsstub/$,$,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub" + ) + endif() + # else (WINDOWS) # Linux set_target_properties(${VIEWER_BINARY_NAME} From 77746a648fe6b98e8bd501bfa3636c35315fb80d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 20 Oct 2025 11:27:00 +0200 Subject: [PATCH 2/2] Prevent full rebuild each time CMake detects any changes --- indra/cmake/APR.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index ba5ba48ba8..ed5a651b61 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -34,6 +34,9 @@ target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include # Hotfix incorrect check in APR header file(READ ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h APR_HEADER_CONTENTS) -string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}") -file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}") -# \ No newline at end of file +string(FIND "${APR_HEADER_CONTENTS}" "#if !(defined(__attribute__) || defined(__has_attribute))" ATTRIBUTE_TYPEDEF_POS) +if (${ATTRIBUTE_TYPEDEF_POS} GREATER -1) + string(REPLACE "#if !(defined(__attribute__) || defined(__has_attribute))" "#if !defined(__attribute__)" APR_HEADER_CONTENTS "${APR_HEADER_CONTENTS}") + file(WRITE ${LIBS_PREBUILT_DIR}/include/apr-1/apr.h "${APR_HEADER_CONTENTS}") +endif() +#