This updates the libraries dependencies for VFX platform 2023, and adds various new libraries. It also enables Python bindings and switches from static to shared for various libraries. The precompiled libraries for all platforms will be updated to these new versions in the coming weeks. New: Fribidi 1.0.12 Harfbuzz 5.1.0 MaterialX 1.38.6 (shared lib with python bindings) Minizipng 3.0.7 Pybind11 2.10.1 Shaderc 2022.3 Vulkan 1.2.198 Updated: Boost 1.8.0 (shared lib) Cython 0.29.30 Numpy 1.23.2 OpenColorIO 2.2.0 (shared lib with python bindings) OpenImageIO 2.4.6.0 (shared lib with python bindings) OpenSubdiv 3.5.0 OpenVDB 10.0.0 (shared lib with python bindings) OSL 1.12.7.1 (enable nvptx backend) TBB (shared lib) USD 22.11 (shared lib with python bindings, enable hydra) yaml-cpp 0.8.0 Includes contributions by Ray Molenkamp, Brecht Van Lommel, Georgiy Markelov and Campbell Barton. Ref T99618
69 lines
2.3 KiB
CMake
69 lines
2.3 KiB
CMake
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
if(UNIX)
|
|
set(OPENCOLLADA_EXTRA_ARGS
|
|
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
|
-DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a)
|
|
|
|
# WARNING: the patch contains mixed UNIX and DOS line endings
|
|
# as does the OPENCOLLADA package, if this can be corrected upstream that would be better.
|
|
# For now use `sed` to force UNIX line endings so the patch applies.
|
|
# Needed as neither ignoring white-space or applying as a binary resolve this problem.
|
|
if(APPLE)
|
|
set(_dos2unix dos2unix)
|
|
else()
|
|
set(_dos2unix sed -i "s/\\r//")
|
|
endif()
|
|
set(PATCH_MAYBE_DOS2UNIX_CMD
|
|
${_dos2unix}
|
|
${PATCH_DIR}/opencollada.diff
|
|
${BUILD_DIR}/opencollada/src/external_opencollada/CMakeLists.txt
|
|
${BUILD_DIR}/opencollada/src/external_opencollada/Externals/LibXML/CMakeLists.txt &&
|
|
)
|
|
else()
|
|
set(OPENCOLLADA_EXTRA_ARGS
|
|
-DCMAKE_DEBUG_POSTFIX=_d
|
|
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
|
)
|
|
if(BUILD_MODE STREQUAL Release)
|
|
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2s.lib)
|
|
else()
|
|
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib)
|
|
endif()
|
|
set(PATCH_MAYBE_DOS2UNIX_CMD)
|
|
endif()
|
|
|
|
ExternalProject_Add(external_opencollada
|
|
URL file://${PACKAGE_DIR}/${OPENCOLLADA_FILE}
|
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
|
URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH}
|
|
PREFIX ${BUILD_DIR}/opencollada
|
|
PATCH_COMMAND
|
|
${PATCH_MAYBE_DOS2UNIX_CMD}
|
|
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff
|
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS}
|
|
INSTALL_DIR ${LIBDIR}/opencollada
|
|
)
|
|
|
|
unset(PATCH_MAYBE_DOS2UNIX_CMD)
|
|
|
|
add_dependencies(
|
|
external_opencollada
|
|
external_xml2
|
|
)
|
|
|
|
if(WIN32)
|
|
if(BUILD_MODE STREQUAL Release)
|
|
ExternalProject_Add_Step(external_opencollada after_install
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/
|
|
DEPENDEES install
|
|
)
|
|
endif()
|
|
if(BUILD_MODE STREQUAL Debug)
|
|
ExternalProject_Add_Step(external_opencollada after_install
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/lib ${HARVEST_TARGET}/opencollada/lib
|
|
DEPENDEES install
|
|
)
|
|
endif()
|
|
endif()
|