Build: install all shared libraries regardless of build options
There are dependencies between shared libraries, and Python modules which are always installed on Linux and macOS can use these also. Instead of adding logic for dealing with dependencies and conditional Python module installs, just always install everything when using precompiled libraries. This does not affect compile time which would be the main reason to turn off build options, and it does not affect the case where system libraries are used.
This commit is contained in:
parent
65d8da97b8
commit
eb7ac996cc
|
@ -832,27 +832,22 @@ endif()
|
|||
# enable boost for cycles, audaspace or i18n
|
||||
# otherwise if the user disabled
|
||||
|
||||
set_and_warn_dependency(WITH_BOOST WITH_CYCLES OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
||||
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
|
||||
if(WITH_CYCLES)
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
|
||||
|
||||
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
|
||||
if(WITH_BOOST AND NOT (WITH_INTERNATIONAL OR WITH_OPENVDB OR
|
||||
WITH_QUADRIFOLOW OR WITH_USD))
|
||||
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
|
||||
set(WITH_BOOST OFF)
|
||||
endif()
|
||||
|
||||
set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_USD OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
|
||||
|
||||
|
@ -861,14 +856,10 @@ set_and_warn_dependency(WITH_OPENVDB WITH_NANOVDB OFF)
|
|||
|
||||
# OpenVDB and OpenColorIO uses 'half' type from OpenEXR
|
||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
|
||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENCOLORIO OFF)
|
||||
|
||||
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
|
||||
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
|
||||
|
||||
# USD needs OpenSubDiv, since that is used by the Cycles Hydra render delegate.
|
||||
set_and_warn_dependency(WITH_OPENSUBDIV WITH_USD OFF)
|
||||
|
||||
# auto enable openimageio for cycles
|
||||
if(WITH_CYCLES)
|
||||
set(WITH_OPENIMAGEIO ON)
|
||||
|
@ -882,17 +873,6 @@ else()
|
|||
set(WITH_CYCLES_OSL OFF)
|
||||
endif()
|
||||
|
||||
# auto enable openimageio linking dependencies
|
||||
if(WITH_OPENIMAGEIO)
|
||||
set(WITH_IMAGE_OPENEXR ON)
|
||||
set(WITH_IMAGE_TIFF ON)
|
||||
endif()
|
||||
|
||||
# auto enable alembic linking dependencies
|
||||
if(WITH_ALEMBIC)
|
||||
set(WITH_IMAGE_OPENEXR ON)
|
||||
endif()
|
||||
|
||||
# don't store paths to libs for portable distribution
|
||||
if(WITH_INSTALL_PORTABLE)
|
||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
|
|
|
@ -86,16 +86,14 @@ endif()
|
|||
|
||||
if(WITH_USD)
|
||||
find_package(USD REQUIRED)
|
||||
add_bundled_libraries(usd/lib)
|
||||
endif()
|
||||
add_bundled_libraries(usd/lib)
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
if(WITH_MATERIALX)
|
||||
add_bundled_libraries(materialx/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(materialx/lib)
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package(MoltenVK REQUIRED)
|
||||
|
@ -117,8 +115,8 @@ endif()
|
|||
|
||||
if(WITH_OPENSUBDIV)
|
||||
find_package(OpenSubdiv)
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
endif()
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package(SndFile)
|
||||
|
@ -156,9 +154,9 @@ list(APPEND FREETYPE_LIBRARIES
|
|||
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package(OpenEXR)
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
endif()
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||
|
@ -270,12 +268,11 @@ if(WITH_BOOST)
|
|||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||
set(BOOST_DEFINITIONS)
|
||||
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
mark_as_advanced(Boost_LIBRARIES)
|
||||
mark_as_advanced(Boost_INCLUDE_DIRS)
|
||||
unset(_boost_FIND_COMPONENTS)
|
||||
endif()
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
|
||||
|
@ -297,13 +294,13 @@ if(WITH_OPENIMAGEIO)
|
|||
)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
endif()
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package(OpenColorIO 2.0.0 REQUIRED)
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
endif()
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
|
@ -314,8 +311,8 @@ if(WITH_OPENVDB)
|
|||
unset(BLOSC_LIBRARIES CACHE)
|
||||
endif()
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
endif()
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package(NanoVDB)
|
||||
|
@ -363,8 +360,8 @@ endif()
|
|||
|
||||
if(WITH_TBB)
|
||||
find_package(TBB REQUIRED)
|
||||
add_bundled_libraries(tbb/lib)
|
||||
endif()
|
||||
add_bundled_libraries(tbb/lib)
|
||||
|
||||
if(WITH_POTRACE)
|
||||
find_package(Potrace REQUIRED)
|
||||
|
@ -382,9 +379,9 @@ if(WITH_OPENMP)
|
|||
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/")
|
||||
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
|
||||
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib")
|
||||
add_bundled_libraries(openmp/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openmp/lib)
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK REQUIRED)
|
||||
|
|
|
@ -166,11 +166,9 @@ endif()
|
|||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(OpenJPEG)
|
||||
|
@ -328,11 +326,8 @@ endif()
|
|||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package_wrapper(NanoVDB)
|
||||
|
@ -351,18 +346,14 @@ endif()
|
|||
if(WITH_USD)
|
||||
find_package_wrapper(USD)
|
||||
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
||||
if(WITH_USD)
|
||||
add_bundled_libraries(usd/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(usd/lib)
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package_wrapper(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
if(WITH_MATERIALX)
|
||||
add_bundled_libraries(materialx/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(materialx/lib)
|
||||
|
||||
if(WITH_BOOST)
|
||||
# uses in build instructions to override include and library variables
|
||||
|
@ -418,9 +409,8 @@ if(WITH_BOOST)
|
|||
find_package(IcuLinux)
|
||||
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
|
||||
endif()
|
||||
|
||||
add_bundled_libraries(boost/lib)
|
||||
endif()
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
find_package_wrapper(PugiXML)
|
||||
|
@ -455,21 +445,16 @@ if(WITH_OPENIMAGEIO)
|
|||
endif()
|
||||
|
||||
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
||||
if(WITH_OPENIMAGEIO)
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package_wrapper(OpenColorIO 2.0.0)
|
||||
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.8.0 REQUIRED)
|
||||
|
@ -510,18 +495,14 @@ if(WITH_OPENSUBDIV)
|
|||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
||||
if(WITH_OPENSUBDIV)
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package_wrapper(TBB)
|
||||
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
||||
if(WITH_TBB)
|
||||
add_bundled_libraries(tbb/lib)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(tbb/lib)
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK)
|
||||
|
@ -1013,18 +994,6 @@ endfunction()
|
|||
|
||||
configure_atomic_lib_if_needed()
|
||||
|
||||
# Handle library inter-dependencies.
|
||||
# FIXME: find a better place to handle inter-library dependencies.
|
||||
# This is done near the end of the file to ensure bundled libraries are not added multiple times.
|
||||
if(WITH_USD)
|
||||
if(NOT WITH_OPENIMAGEIO)
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
endif()
|
||||
if(NOT WITH_OPENVDB)
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
# For the installed Python module and installed Blender executable, we set the
|
||||
# rpath to the relative path where the install step will copy the shared libraries.
|
||||
|
|
|
@ -494,27 +494,27 @@ if(WITH_OPENCOLORIO)
|
|||
DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/colormanagement
|
||||
DESTINATION ${TARGETDIR_VER}/datafiles
|
||||
)
|
||||
if(WIN32)
|
||||
if(EXISTS ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll) # 3.5
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/opencolorio/bin/opencolorio_d_2_2.dll
|
||||
DEBUG
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/opencolorio/lib/site-packages-debug/PyOpenColorIO_d.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/opencolorio/lib/site-packages/PyOpenColorIO.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WIN32)
|
||||
if(EXISTS ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll) # 3.5
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/opencolorio/bin/opencolorio_d_2_2.dll
|
||||
DEBUG
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/opencolorio/lib/site-packages-debug/PyOpenColorIO_d.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/opencolorio/lib/site-packages/PyOpenColorIO.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -853,12 +853,10 @@ elseif(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/fftw3/lib/libfftw3-3.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/fftw3/lib/libfftw3-3.dll
|
||||
ALL
|
||||
)
|
||||
if(MSVC_ASAN)
|
||||
# The ASAN DLL's can be found in the same folder as the compiler,
|
||||
# this is the easiest way to find these.
|
||||
|
@ -882,60 +880,54 @@ elseif(WIN32)
|
|||
unset(ASAN_DLL)
|
||||
unset(ASAN_DEBUG_DLL)
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR OR WITH_OPENIMAGEIO)
|
||||
if(EXISTS ${LIBDIR}/openexr/bin/Iex.dll)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openexr/bin/Iex.dll
|
||||
${LIBDIR}/openexr/bin/IlmThread.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRCore.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRUtil.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXR.dll
|
||||
${LIBDIR}/imath/bin/imath.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openexr/bin/Iex_d.dll
|
||||
${LIBDIR}/openexr/bin/IlmThread_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRCore_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRUtil_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXR_d.dll
|
||||
${LIBDIR}/imath/bin/imath_d.dll
|
||||
DEBUG
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
if(EXISTS ${LIBDIR}/openimageio/bin/openimageio.dll)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openimageio/bin/openimageio.dll
|
||||
${LIBDIR}/openimageio/bin/openimageio_util.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openimageio/bin/openimageio_d.dll
|
||||
${LIBDIR}/openimageio/bin/openimageio_util_d.dll
|
||||
DEBUG
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_GMP)
|
||||
if(EXISTS ${LIBDIR}/openexr/bin/Iex.dll)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmp-10.dll
|
||||
ALL
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmpxx.dll
|
||||
FILES
|
||||
${LIBDIR}/openexr/bin/Iex.dll
|
||||
${LIBDIR}/openexr/bin/IlmThread.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRCore.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRUtil.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXR.dll
|
||||
${LIBDIR}/imath/bin/imath.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmpxx_d.dll
|
||||
FILES
|
||||
${LIBDIR}/openexr/bin/Iex_d.dll
|
||||
${LIBDIR}/openexr/bin/IlmThread_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRCore_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXRUtil_d.dll
|
||||
${LIBDIR}/openexr/bin/OpenEXR_d.dll
|
||||
${LIBDIR}/imath/bin/imath_d.dll
|
||||
DEBUG
|
||||
)
|
||||
endif()
|
||||
if(EXISTS ${LIBDIR}/openimageio/bin/openimageio.dll)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openimageio/bin/openimageio.dll
|
||||
${LIBDIR}/openimageio/bin/openimageio_util.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openimageio/bin/openimageio_d.dll
|
||||
${LIBDIR}/openimageio/bin/openimageio_util_d.dll
|
||||
DEBUG
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmp-10.dll
|
||||
ALL
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmpxx.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/gmp/lib/libgmpxx_d.dll
|
||||
DEBUG
|
||||
)
|
||||
|
||||
if(WITH_WINDOWS_PDB)
|
||||
if(WITH_WINDOWS_STRIPPED_PDB)
|
||||
|
@ -952,55 +944,51 @@ elseif(WIN32)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/openvdb/bin/openvdb.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/openvdb/bin/openvdb_d.dll
|
||||
DEBUG
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/openvdb/bin/openvdb.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/openvdb/bin/openvdb_d.dll
|
||||
DEBUG
|
||||
)
|
||||
|
||||
# This will not exist for 3.4 and earlier lib folders
|
||||
# to ease the transition, support both 3.4 and 3.5 lib
|
||||
# folders.
|
||||
if(EXISTS ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd)
|
||||
install(
|
||||
FILES ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/openvdb/python/pyopenvdb.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
)
|
||||
endif()
|
||||
# This will not exist for 3.4 and earlier lib folders
|
||||
# to ease the transition, support both 3.4 and 3.5 lib
|
||||
# folders.
|
||||
if(EXISTS ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd)
|
||||
install(
|
||||
FILES ${LIBDIR}/openvdb/python/pyopenvdb_d.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
install(
|
||||
FILES ${LIBDIR}/openvdb/python/pyopenvdb.pyd
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/materialx/bin/MaterialXCore.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXFormat.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenGlsl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenMdl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenOsl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenShader.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/materialx/bin/MaterialXCore_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXFormat_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenGlsl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenMdl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenOsl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenShader_d.dll
|
||||
DEBUG
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/materialx/bin/MaterialXCore.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXFormat.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenGlsl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenMdl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenOsl.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenShader.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/materialx/bin/MaterialXCore_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXFormat_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenGlsl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenMdl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenOsl_d.dll
|
||||
${LIBDIR}/materialx/bin/MaterialXGenShader_d.dll
|
||||
DEBUG
|
||||
)
|
||||
|
||||
if(WITH_PYTHON)
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
@ -1081,63 +1069,10 @@ elseif(WIN32)
|
|||
DESTINATION ${BLENDER_VERSION}/python/bin
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
if(WITH_OPENIMAGEIO)
|
||||
if(EXISTS ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}/site-packages) #this will only exist for 3.5+
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}/site-packages/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
if(EXISTS ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}_debug/site-packages)
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}_debug/site-packages/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Debug
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_USD)
|
||||
# This will not exist for 3.4 and earlier lib folders
|
||||
# to ease the transition, support both 3.4 and 3.5 lib
|
||||
# folders.
|
||||
if(EXISTS ${USD_LIBRARY_DIR}/python/)
|
||||
install(
|
||||
DIRECTORY ${USD_LIBRARY_DIR}/python/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
if(EXISTS ${USD_LIBRARY_DIR}/debug/python/)
|
||||
install(
|
||||
DIRECTORY ${USD_LIBRARY_DIR}/debug/python/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
# MaterialX python bindings
|
||||
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/materialx/python/Release/MaterialX
|
||||
if(EXISTS ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}/site-packages) #this will only exist for 3.5+
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}/site-packages/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
|
@ -1145,8 +1080,10 @@ elseif(WIN32)
|
|||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
if(EXISTS ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}_debug/site-packages)
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/materialx/python/Debug/MaterialX
|
||||
DIRECTORY ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}_debug/site-packages/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Debug
|
||||
PATTERN ".svn" EXCLUDE
|
||||
|
@ -1156,6 +1093,52 @@ elseif(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
# This will not exist for 3.4 and earlier lib folders
|
||||
# to ease the transition, support both 3.4 and 3.5 lib
|
||||
# folders.
|
||||
if(EXISTS ${USD_LIBRARY_DIR}/python/)
|
||||
install(
|
||||
DIRECTORY ${USD_LIBRARY_DIR}/python/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
if(EXISTS ${USD_LIBRARY_DIR}/debug/python/)
|
||||
install(
|
||||
DIRECTORY ${USD_LIBRARY_DIR}/debug/python/
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
|
||||
CONFIGURATIONS Debug
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
endif()
|
||||
|
||||
# MaterialX python bindings
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/materialx/python/Release/MaterialX
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/materialx/python/Debug/MaterialX
|
||||
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages/
|
||||
CONFIGURATIONS Debug
|
||||
PATTERN ".svn" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyc" EXCLUDE # * any cache *
|
||||
PATTERN "*.pyo" EXCLUDE # * any cache *
|
||||
)
|
||||
|
||||
if(WINDOWS_PYTHON_DEBUG)
|
||||
install(
|
||||
FILES
|
||||
|
@ -1175,45 +1158,41 @@ elseif(WIN32)
|
|||
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
# Filenames change slightly between FFMPEG versions check both 5.0 and fallback to 4.4
|
||||
# to ease the transition between versions.
|
||||
if(EXISTS "${LIBDIR}/ffmpeg/lib/avcodec-59.dll")
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avformat-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avdevice-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avutil-57.dll
|
||||
${LIBDIR}/ffmpeg/lib/swscale-6.dll
|
||||
${LIBDIR}/ffmpeg/lib/swresample-4.dll
|
||||
ALL
|
||||
)
|
||||
else()
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/ffmpeg/lib/avcodec-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avformat-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avdevice-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avutil-56.dll
|
||||
${LIBDIR}/ffmpeg/lib/swscale-5.dll
|
||||
${LIBDIR}/ffmpeg/lib/swresample-3.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_TBB)
|
||||
# Filenames change slightly between FFMPEG versions check both 5.0 and fallback to 4.4
|
||||
# to ease the transition between versions.
|
||||
if(EXISTS "${LIBDIR}/ffmpeg/lib/avcodec-59.dll")
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/tbb/bin/tbb.dll
|
||||
RELEASE
|
||||
${LIBDIR}/ffmpeg/lib/avcodec-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avformat-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avdevice-59.dll
|
||||
${LIBDIR}/ffmpeg/lib/avutil-57.dll
|
||||
${LIBDIR}/ffmpeg/lib/swscale-6.dll
|
||||
${LIBDIR}/ffmpeg/lib/swresample-4.dll
|
||||
ALL
|
||||
)
|
||||
else()
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/tbb/bin/tbb_debug.dll
|
||||
DEBUG
|
||||
${LIBDIR}/ffmpeg/lib/avcodec-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avformat-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avdevice-58.dll
|
||||
${LIBDIR}/ffmpeg/lib/avutil-56.dll
|
||||
${LIBDIR}/ffmpeg/lib/swscale-5.dll
|
||||
${LIBDIR}/ffmpeg/lib/swresample-3.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/tbb/bin/tbb.dll
|
||||
RELEASE
|
||||
)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/tbb/bin/tbb_debug.dll
|
||||
DEBUG
|
||||
)
|
||||
if(WITH_TBB_MALLOC_PROXY)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
|
@ -1230,27 +1209,21 @@ elseif(WIN32)
|
|||
list(APPEND LIB ${TBB_MALLOC_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll
|
||||
ALL
|
||||
)
|
||||
|
||||
if(WITH_OPENAL)
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openal/lib/OpenAL32.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES
|
||||
${LIBDIR}/openal/lib/OpenAL32.dll
|
||||
ALL
|
||||
)
|
||||
|
||||
if(WITH_SDL)
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/sdl/lib/SDL2.dll
|
||||
ALL
|
||||
)
|
||||
endif()
|
||||
windows_install_shared_manifest(
|
||||
FILES ${LIBDIR}/sdl/lib/SDL2.dll
|
||||
ALL
|
||||
)
|
||||
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
install(
|
||||
|
@ -1522,30 +1495,36 @@ blender_target_include_dirs(blender ${INC})
|
|||
if(WITH_USD)
|
||||
add_definitions(-DWITH_USD)
|
||||
absolute_include_dirs(../blender/io/usd)
|
||||
endif()
|
||||
|
||||
# Always install USD shared library and datafiles regardless if Blender
|
||||
# itself uses them, the bundled Python module still needs it.
|
||||
if(LIBDIR AND TARGETDIR_LIB)
|
||||
# On windows the usd library sits in ./blender.shared copy the files
|
||||
# relative to the location of the USD dll, if the dll does not exist
|
||||
# assume we are linking against the static 3.5 lib.
|
||||
if(WIN32 AND
|
||||
(
|
||||
EXISTS ${LIBDIR}/usd/lib/usd_usd_ms.dll OR # USD 22.03
|
||||
EXISTS ${LIBDIR}/usd/lib/usd_ms.dll # USD 22.11
|
||||
if(WITH_USD)
|
||||
if(WIN32 AND
|
||||
(
|
||||
EXISTS ${LIBDIR}/usd/lib/usd_usd_ms.dll OR # USD 22.03
|
||||
EXISTS ${LIBDIR}/usd/lib/usd_ms.dll # USD 22.11
|
||||
)
|
||||
)
|
||||
)
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION "./blender.shared"
|
||||
)
|
||||
elseif(USD_PYTHON_SUPPORT)
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION ${TARGETDIR_LIB}
|
||||
)
|
||||
else()
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION "${TARGETDIR_VER}/datafiles"
|
||||
)
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION "./blender.shared"
|
||||
)
|
||||
elseif(USD_PYTHON_SUPPORT)
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION ${TARGETDIR_LIB}
|
||||
)
|
||||
else()
|
||||
install(DIRECTORY
|
||||
${USD_LIBRARY_DIR}/usd
|
||||
DESTINATION "${TARGETDIR_VER}/datafiles"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WIN32)
|
||||
# If this file exists we are building against a 3.5 22.03 library folder
|
||||
|
@ -1575,14 +1554,16 @@ if(WITH_USD)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_MATERIALX AND TARGETDIR_LIB)
|
||||
# Always install MaterialX files regardless if Blender itself uses them, the
|
||||
# bundled Python module still needs it.
|
||||
if(WITH_MATERIALX AND LIBDIR AND TARGETDIR_LIB)
|
||||
install(
|
||||
DIRECTORY ${LIBDIR}/materialx/libraries
|
||||
DESTINATION "${TARGETDIR_LIB}/materialx"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND WITH_BOOST)
|
||||
if(WIN32)
|
||||
set(BOOST_COMPONENTS atomic chrono date_time filesystem
|
||||
iostreams locale program_options regex
|
||||
serialization system thread wave wserialization
|
||||
|
|
Loading…
Reference in New Issue