From fc7a909b8da32a58d57c4c32fabea6e7ee905f53 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Tue, 18 Nov 2025 12:59:01 +1000 Subject: [PATCH] Further attempted fixes for building with Havok_TPV on macOS --- indra/cmake/LLPhysicsExtensions.cmake | 7 +++++-- indra/newview/CMakeLists.txt | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 6b8f50419c..2d4734c61c 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -40,8 +40,9 @@ elseif (HAVOK_TPV) # havok lib get installed to packages/lib link_directories( ${LIBS_PREBUILT_DIR}/lib ) # +endif () -else (HAVOK) +if ((NOT HAVOK AND NOT HAVOK_TPV) OR DARWIN) # ARM64 requires ndPhyicsStub use_prebuilt_binary( ndPhysicsStub ) # Don't set this variable, there is no need to build any stub source if using ndPhysicsStub @@ -68,7 +69,9 @@ else (HAVOK) libnd_Pathing.a PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH) - target_link_libraries(llphysicsextensions_impl INTERFACE ${ND_HACDCONVEXDECOMPOSITION_LIBRARY} ${HACD_LIBRARY} ${ND_PATHING_LIBRARY}) + if (NOT DARWIN) # Done in newview/CMakeLists.txt for darwin + target_link_libraries(llphysicsextensions_impl INTERFACE ${ND_HACDCONVEXDECOMPOSITION_LIBRARY} ${HACD_LIBRARY} ${ND_PATHING_LIBRARY}) + endif() # # include paths for LLs version and ours are different. diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2964233df5..ef597a01c4 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2532,10 +2532,12 @@ elseif (DARWIN) 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${ARCH_PREBUILT_DIRS}/ -lllphysicsextensions_tpv" - XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_BINARY_DIR}/llphysicsextensionsstub/$,$,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub" + XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) \ + ${ND_HACDCONVEXDECOMPOSITION_LIBRARY} \ + ${HACD_LIBRARY} \ + ${ND_PATHING_LIBRARY}" ) endif() #