diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-31 14:45:16 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-31 14:45:16 +0800 |
commit | 9827994d9b4f697b0c3bc08c87f728517930e198 (patch) | |
tree | 57e33720c8cee50243842ecce18dab52b5a44a8d | |
parent | 3bba39cf3e4d56da5aba883479539ed89fa578b9 (diff) |
Revert "macOS uses prebuilt Collada DOM binaries"
This reverts commit 3bba39cf3e4d56da5aba883479539ed89fa578b9.
-rw-r--r-- | autobuild.xml | 2 | ||||
-rw-r--r-- | indra/cmake/LLPrimitive.cmake | 86 |
2 files changed, 45 insertions, 43 deletions
diff --git a/autobuild.xml b/autobuild.xml index a33c994055..ee5dcdb8d9 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -248,7 +248,7 @@ <key>hash_algorithm</key> <string>sha1</string> <key>url</key> - <string>https://megapahit.net/downloads/colladadom-2.3.8500178177-darwin64-8500178177.tar.zst</string> + <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r4/colladadom-2.3.8500178177-darwin64-8500178177.tar.zst</string> </map> <key>name</key> <string>darwin64</string> diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 216f4d574a..9ea7ff899e 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -29,7 +29,7 @@ if(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) endif(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) if( USESYSTEMLIBS ) - if ( NOT DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0) ) + if ( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz) file(DOWNLOAD https://github.com/secondlife/3p-colladadom/archive/refs/tags/v2.3-r4.tar.gz @@ -45,24 +45,47 @@ if( USESYSTEMLIBS ) pkg_check_modules(Minizip REQUIRED minizip) pkg_check_modules(Libxml2 REQUIRED libxml-2.0) pkg_check_modules(Libpcrecpp libpcrecpp) - try_compile(COLLADADOM_RESULT - PROJECT colladadom - SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 - TARGET collada14dom - CMAKE_FLAGS - -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DOPT_COLLADA14:BOOL=ON - -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada - -DCOLLADA_DOM_SOVERSION:STRING=0 - -DCOLLADA_DOM_VERSION:STRING=2.3-r4 - -DEXTRA_COMPILE_FLAGS:STRING="-I${Minizip_INCLUDE_DIRS} -I${Libxml2_INCLUDE_DIRS} -I${Libpcrecpp_INCLUDE_DIRS}" - -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L${Libxml2_LIBRARY_DIRS} -l${Libxml2_LIBRARIES}" - -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp - -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem - -DBoost_SYSTEM_LIBRARY:STRING=boost_system - OUTPUT_VARIABLE colladadom_installed - ) + if (DARWIN) + try_compile(COLLADADOM_RESULT + PROJECT colladadom + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + TARGET collada14dom + CMAKE_FLAGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DOPT_COLLADA14:BOOL=ON + -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada + -DCOLLADA_DOM_SOVERSION:STRING=0 + -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + -DEXTRA_COMPILE_FLAGS:STRING="-I${Minizip_INCLUDE_DIRS} -I${Libxml2_INCLUDE_DIRS}" + -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L${Libxml2_LIBRARY_DIRS} -l${Libxml2_LIBRARIES}" + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt + -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt + -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} + -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 + OUTPUT_VARIABLE colladadom_installed + ) + else (DARWIN) + try_compile(COLLADADOM_RESULT + PROJECT colladadom + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4 + TARGET collada14dom + CMAKE_FLAGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DOPT_COLLADA14:BOOL=ON + -DCOLLADA_DOM_INCLUDE_INSTALL_DIR:FILEPATH=${LIBS_PREBUILT_DIR}/include/collada + -DCOLLADA_DOM_SOVERSION:STRING=0 + -DCOLLADA_DOM_VERSION:STRING=2.3-r4 + -DEXTRA_COMPILE_FLAGS:STRING="-I${Minizip_INCLUDE_DIRS} -I${Libxml2_INCLUDE_DIRS} -I${Libpcrecpp_INCLUDE_DIRS}" + -DCMAKE_SHARED_LINKER_FLAGS:STRING="-L${Libxml2_LIBRARY_DIRS} -l${Libxml2_LIBRARIES}" + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem + -DBoost_SYSTEM_LIBRARY:STRING=boost_system + OUTPUT_VARIABLE colladadom_installed + ) + endif (DARWIN) if (${COLLADADOM_RESULT}) file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada) file( @@ -75,36 +98,15 @@ if( USESYSTEMLIBS ) ) file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "0") endif (${COLLADADOM_RESULT}) - endif ( NOT DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0) ) + endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) else( USESYSTEMLIBS ) use_system_binary( colladadom ) -endif( USESYSTEMLIBS ) -if( DARWIN OR NOT USESYSTEMLIBS ) use_prebuilt_binary(colladadom) - if( DARWIN ) - execute_process( - COMMAND lipo -archs libcollada14dom.2.3-r4.dylib - WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release - OUTPUT_VARIABLE colladadom_archs - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if( NOT ${colladadom_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES} ) - execute_process( - COMMAND lipo - libcollada14dom.2.3-r4.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libcollada14dom.2.3-r4.dylib - WORKING_DIRECTORY ${LIBS_PREBUILT_DIR}/lib/release - ) - endif( NOT ${colladadom_archs} STREQUAL ${CMAKE_OSX_ARCHITECTURES} ) - endif( DARWIN ) -endif( DARWIN OR NOT USESYSTEMLIBS ) -if( NOT USESYSTEMLIBS ) use_prebuilt_binary(minizip-ng) # needed for colladadom use_prebuilt_binary(pcre) use_prebuilt_binary(libxml2) -endif( NOT USESYSTEMLIBS ) +endif( USESYSTEMLIBS ) target_link_libraries( ll::pcre INTERFACE pcrecpp pcre ) |