More fixes for Havok_TPV to try compile on macOS with universal build
parent
b4bef3964b
commit
54212f1b6c
|
|
@ -29,10 +29,16 @@ if (HAVOK)
|
||||||
#target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub)
|
#target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub)
|
||||||
else()
|
else()
|
||||||
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
|
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
|
||||||
|
target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 )
|
||||||
endif()
|
endif()
|
||||||
elseif (HAVOK_TPV)
|
elseif (HAVOK_TPV)
|
||||||
use_prebuilt_binary(llphysicsextensions_tpv)
|
use_prebuilt_binary(llphysicsextensions_tpv)
|
||||||
|
# <FS:TJ> Done in newview/CMakeLists.txt for darwin if Havok is enabled
|
||||||
|
if (NOT DARWIN)
|
||||||
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
|
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
|
||||||
|
target_compile_definitions( llphysicsextensions_impl INTERFACE LL_HAVOK=1 )
|
||||||
|
endif()
|
||||||
|
# </FS:TJ>
|
||||||
# <FS:ND> include paths for LLs version and ours are different.
|
# <FS:ND> include paths for LLs version and ours are different.
|
||||||
target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
||||||
# </FS:ND>
|
# </FS:ND>
|
||||||
|
|
@ -42,7 +48,7 @@ elseif (HAVOK_TPV)
|
||||||
# </FS:ND>
|
# </FS:ND>
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ((NOT HAVOK AND NOT HAVOK_TPV) OR DARWIN) # <FS:TJ> ARM64 requires ndPhyicsStub
|
if ((NOT HAVOK AND NOT HAVOK_TPV) OR DARWIN) # <FS:TJ/> ARM64 requires ndPhysicsStub
|
||||||
use_prebuilt_binary( ndPhysicsStub )
|
use_prebuilt_binary( ndPhysicsStub )
|
||||||
|
|
||||||
# <FS:ND> Don't set this variable, there is no need to build any stub source if using ndPhysicsStub
|
# <FS:ND> Don't set this variable, there is no need to build any stub source if using ndPhysicsStub
|
||||||
|
|
@ -69,7 +75,7 @@ if ((NOT HAVOK AND NOT HAVOK_TPV) OR DARWIN) # <FS:TJ> ARM64 requires ndPhyicsSt
|
||||||
libnd_Pathing.a
|
libnd_Pathing.a
|
||||||
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)
|
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)
|
||||||
|
|
||||||
if (NOT HAVOK AND NOT HAVOK_TPV) # Done in newview/CMakeLists.txt for darwin if Havok is enabled
|
if (NOT HAVOK AND NOT HAVOK_TPV) # <FS:TJ/> Done in newview/CMakeLists.txt for darwin if Havok is enabled
|
||||||
target_link_libraries(llphysicsextensions_impl INTERFACE ${ND_HACDCONVEXDECOMPOSITION_LIBRARY} ${HACD_LIBRARY} ${ND_PATHING_LIBRARY})
|
target_link_libraries(llphysicsextensions_impl INTERFACE ${ND_HACDCONVEXDECOMPOSITION_LIBRARY} ${HACD_LIBRARY} ${ND_PATHING_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
# </FS:TJ>
|
# </FS:TJ>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ include(Discord)
|
||||||
if (LLPHYSICSEXTENSIONS_SRC_DIR)
|
if (LLPHYSICSEXTENSIONS_SRC_DIR)
|
||||||
# </FS:ND>
|
# </FS:ND>
|
||||||
|
|
||||||
if (NOT HAVOK_TPV)
|
if (HAVOK)
|
||||||
# When using HAVOK_TPV, the library is precompiled, so no need for this
|
# When using HAVOK_TPV, the library is precompiled, so no need for this
|
||||||
|
|
||||||
# Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball
|
# Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball
|
||||||
|
|
@ -86,7 +86,7 @@ if (NOT HAVOK_TPV)
|
||||||
target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef)
|
target_compile_options( llphysicsextensions PRIVATE -Wno-unused-local-typedef)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
endif()
|
endif()
|
||||||
endif (NOT HAVOK_TPV)
|
endif ()
|
||||||
|
|
||||||
# <FS:ND>
|
# <FS:ND>
|
||||||
endif (LLPHYSICSEXTENSIONS_SRC_DIR)
|
endif (LLPHYSICSEXTENSIONS_SRC_DIR)
|
||||||
|
|
@ -2233,10 +2233,6 @@ if (WINDOWS)
|
||||||
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
|
list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES})
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
if (HAVOK OR HAVOK_TPV)
|
|
||||||
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_HAVOK")
|
|
||||||
endif (HAVOK OR HAVOK_TPV)
|
|
||||||
|
|
||||||
if( DEFINED LLSTARTUP_COMPILE_FLAGS )
|
if( DEFINED LLSTARTUP_COMPILE_FLAGS )
|
||||||
# progress view disables/enables icons based on available packages
|
# progress view disables/enables icons based on available packages
|
||||||
set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
|
set_source_files_properties(llprogressview.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
|
||||||
|
|
@ -2521,7 +2517,7 @@ elseif (DARWIN)
|
||||||
set_target_properties(${VIEWER_BINARY_NAME}
|
set_target_properties(${VIEWER_BINARY_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
# arch specific flags for universal builds: https://stackoverflow.com/a/77942065
|
# 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=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL -DLL_HAVOK=1"
|
||||||
XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB"
|
XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB"
|
||||||
# only generate the .MAP file for llphysicsextensions_tpv on x86_64
|
# 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/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
|
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 -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
|
||||||
|
|
@ -2531,9 +2527,9 @@ elseif (DARWIN)
|
||||||
set_target_properties(${VIEWER_BINARY_NAME}
|
set_target_properties(${VIEWER_BINARY_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
# arch specific flags for universal builds: https://stackoverflow.com/a/77942065
|
# 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=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL -DLL_HAVOK=1"
|
||||||
# only generate the .MAP file for llphysicsextensions_tpv on x86_64
|
# 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=x86_64] "$(inherited) -lllphysicsextensions_tpv"
|
||||||
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) \
|
XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) \
|
||||||
${ND_HACDCONVEXDECOMPOSITION_LIBRARY} \
|
${ND_HACDCONVEXDECOMPOSITION_LIBRARY} \
|
||||||
${HACD_LIBRARY} \
|
${HACD_LIBRARY} \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue