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()
#