Reenable havok llphysicsextensions on Darwin x86_64 with llphysicsextensions_stub used for aarch64

master
Brad Linden 2025-10-01 17:50:28 -07:00
parent 420bc85f97
commit 589498fece
4 changed files with 21 additions and 38 deletions

View File

@ -1432,53 +1432,21 @@
<map>
<key>platforms</key>
<map>
<key>darwin64</key>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>7facda95e2f00c260513f3d4db42588fa8ba703c</string>
<string>1949ae355a70a4cbe2f0969de636680a0b5d7b15</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289774</string>
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/299453833</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>01d08f13c7bc8d1b95b0330fa6833b7d8274e4d0</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289775</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
<key>windows64</key>
<map>
<key>archive</key>
<map>
<key>creds</key>
<string>github</string>
<key>hash</key>
<string>6d00345c7d3471bc5f7c1218e014dd0f1a2c069b</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/196289778</string>
</map>
<key>name</key>
<string>windows64</string>
<string>common</string>
</map>
</map>
<key>license</key>

View File

@ -158,7 +158,6 @@ pre_build()
if [[ "$arch" == "Darwin" ]]
then
HAVOK=OFF
SIGNING=("-DENABLE_SIGNING:BOOL=YES" \
"-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.")
fi

View File

@ -22,7 +22,14 @@ if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
if(DARWIN)
set(LLPHYSICSEXTENSIONS_STUB_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
# can't set these library dependencies per-arch here, need to do it using XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=*] in newview/CMakeLists.txt
#target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
#target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub)
else()
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
endif()
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)

View File

@ -59,6 +59,10 @@ if (NOT HAVOK_TPV)
# which means we need to duct tape this togther ...
add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
if (NOT "${LLPHYSICSEXTENSIONS_STUB_DIR}" EQUAL "")
# for darwin universal builds we need both real llphysicsextensions and the stub for aarch64 fallback
add_subdirectory(${LLPHYSICSEXTENSIONS_STUB_DIR} llphysicsextensionsstub)
endif()
# Another hack that works with newer cmake versions:
cmake_policy( SET CMP0079 NEW)
@ -1952,6 +1956,11 @@ elseif (DARWIN)
RESOURCE SecondLife.xib
#LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip"
# 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"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions"
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensionsstub/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub"
)
else (WINDOWS)
# Linux