From 07bd37da5f7c22e0b5c2795e26d821639b0c9823 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sat, 31 Aug 2024 14:45:42 +0800 Subject: Make sure ColladaDOM gets built now Spaces are really just troublesome in argument passing. They can't really be escaped, quoting from -D would even replace spaces with semicolons. Hence making use of every variable that can be used in Collada DOM's CMakeLists.txt. --- indra/cmake/LLPrimitive.cmake | 56 ++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 16 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index 9ea7ff899e..b07ff2f850 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -53,19 +53,32 @@ if( USESYSTEMLIBS ) TARGET collada14dom CMAKE_FLAGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Libxml2_LIBRARY_DIRS} + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem-mt + -DBoost_SYSTEM_LIBRARY:STRING=boost_system-mt + -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libpcrecpp_INCLUDE_DIRS}/libxml2 + -DEXTRA_COMPILE_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} + -DBoost_CFLAGS:STRING=-I${Libpcrecpp_INCLUDE_DIRS} -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 ) + if (${COLLADADOM_RESULT}) + file( + COPY + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.2.3-r4.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.0.dylib + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.dylib + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + FOLLOW_SYMLINK_CHAIN + ) + endif (${COLLADADOM_RESULT}) else (DARWIN) try_compile(COLLADADOM_RESULT PROJECT colladadom @@ -74,28 +87,39 @@ if( USESYSTEMLIBS ) TARGET collada14dom CMAKE_FLAGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DCMAKE_SHARED_LINKER_FLAGS:STRING=-L${Libxml2_LIBRARY_DIRS} + -Dlibpcrecpp_LIBRARIES:STRING=pcrecpp + -DZLIB_LIBRARIES:STRING=${Libxml2_LIBRARIES} + -DBoost_FILESYSTEM_LIBRARY:STRING=boost_filesystem + -DBoost_SYSTEM_LIBRARY:STRING=boost_system + -Dlibpcrecpp_CFLAGS_OTHERS:STRING=-I${Libxml2_INCLUDE_DIRS} + -DEXTRA_COMPILE_FLAGS:STRING=-I${Minizip_INCLUDE_DIRS} +-I${Libpcrecpp_INCLUDE_DIRS} -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 (${COLLADADOM_RESULT}) + file( + COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/src/1.4/libcollada14dom.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release + ) + endif (${COLLADADOM_RESULT}) endif (DARWIN) if (${COLLADADOM_RESULT}) - file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada) + file(REMOVE_RECURSE ${LIBS_PREBUILT_DIR}/include/collada/1.4) file( - COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/dom/include + COPY + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.4 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/1.5 + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dae.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/dom.h + ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/include/modules DESTINATION ${LIBS_PREBUILT_DIR}/include/collada ) - file( - COPY ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4/dom/libcollada14dom.a - DESTINATION ${LIBS_PREBUILT_DIR}/lib/release - ) file(WRITE ${PREBUILD_TRACKING_DIR}/colladadom_installed "0") endif (${COLLADADOM_RESULT}) endif( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 ) -- cgit v1.2.3