Further attempted fixes for building with Havok_TPV on macOS

master
Hecklezz 2025-11-18 12:59:01 +10:00
parent 7f24a0e8ab
commit fc7a909b8d
2 changed files with 9 additions and 4 deletions

View File

@ -40,8 +40,9 @@ elseif (HAVOK_TPV)
# <FS:ND> havok lib get installed to packages/lib
link_directories( ${LIBS_PREBUILT_DIR}/lib )
# </FS:ND>
endif ()
else (HAVOK)
if ((NOT HAVOK AND NOT HAVOK_TPV) OR DARWIN) # <FS:TJ> ARM64 requires ndPhyicsStub
use_prebuilt_binary( ndPhysicsStub )
# <FS:ND> 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()
# </FS:TJ>
# <FS:ND> include paths for LLs version and ours are different.

View File

@ -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/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) \
${ND_HACDCONVEXDECOMPOSITION_LIBRARY} \
${HACD_LIBRARY} \
${ND_PATHING_LIBRARY}"
)
endif()
# </FS:TJ>