Merge branch 'blender-v4.2-release'

This commit is contained in:
Miguel Pozo 2024-07-02 17:01:01 +02:00
commit 961dcf29ee
71 changed files with 504 additions and 395 deletions

@ -32,6 +32,7 @@ include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
include(cmake/macros.cmake)
include(cmake/check_compilers.cmake)
include(cmake/harvest.cmake)
if(ENABLE_MSYS2)
include(cmake/setup_msys2.cmake)
@ -176,6 +177,5 @@ include(cmake/shaderc_deps.cmake)
include(cmake/shaderc.cmake)
include(cmake/vulkan.cmake)
include(cmake/pybind11.cmake)
include(cmake/harvest.cmake)
include(cmake/deps_html.cmake)
include(cmake/cve_check.cmake)

@ -50,6 +50,10 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_alembic alembic/include alembic/include "*.h")
harvest(external_alembic alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest_rpath_bin(external_alembic alembic/bin alembic/bin "*")
endif()

@ -43,3 +43,7 @@ ExternalProject_Add(external_aom
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
INSTALL_DIR ${LIBDIR}/aom
)
if(NOT WIN32)
harvest(external_aom aom/lib ffmpeg/lib "*.a")
endif()

@ -39,9 +39,14 @@ add_dependencies(
external_blosc
external_zlib
)
if(WIN32)
add_dependencies(
external_blosc
external_pthreads
)
endif()
if(APPLE)
harvest(external_blosc blosc/lib openvdb/lib "*.a")
endif()

@ -115,3 +115,8 @@ add_dependencies(
external_python
external_numpy
)
if(NOT WIN32)
harvest(external_boost boost/include boost/include "*")
harvest_rpath_lib(external_boost boost/lib boost/lib "*${SHAREDLIBEXT}*")
endif()

@ -19,18 +19,23 @@ ExternalProject_Add(external_brotli
INSTALL_DIR ${LIBDIR}/brotli
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_brotli after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/brotli/include
${HARVEST_TARGET}/brotli/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/brotli/lib/brotlidec-static${LIBEXT}
${HARVEST_TARGET}/brotli/lib/brotlidec-static${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/brotli/lib/brotlicommon-static${LIBEXT}
${HARVEST_TARGET}/brotli/lib/brotlicommon-static${LIBEXT}
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_brotli after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/brotli/include
${HARVEST_TARGET}/brotli/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/brotli/lib/brotlidec-static${LIBEXT}
${HARVEST_TARGET}/brotli/lib/brotlidec-static${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/brotli/lib/brotlicommon-static${LIBEXT}
${HARVEST_TARGET}/brotli/lib/brotlicommon-static${LIBEXT}
DEPENDEES install
)
DEPENDEES install
)
endif()
else()
harvest(external_brotli brotli/include brotli/include "*.h")
harvest(external_brotli brotli/lib brotli/lib "*.a")
endif()

@ -127,20 +127,29 @@ add_dependencies(
external_unifiedmemoryframework
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_dpcpp after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/dpcpp ${HARVEST_TARGET}/dpcpp
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang-cl.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang-cpp.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ld.lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ld64.lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld-link.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/wasm-ld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/pi_unified_runtime.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_adapter_level_zero.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_loader.dll
DEPENDEES install
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_dpcpp after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/dpcpp ${HARVEST_TARGET}/dpcpp
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang-cl.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang-cpp.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/clang.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ld.lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ld64.lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/lld-link.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/wasm-ld.exe
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/pi_unified_runtime.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_adapter_level_zero.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${HARVEST_TARGET}/dpcpp/bin/ur_loader.dll
DEPENDEES install
)
endif()
else()
harvest(external_dpcpp dpcpp/bin dpcpp/bin "*")
harvest(external_dpcpp dpcpp/include dpcpp/include "*")
harvest(external_dpcpp dpcpp/lib dpcpp/lib "libsycl*")
# avoid harvesting libpi_unified_runtime and libur_ as they're optional.
harvest(external_dpcpp dpcpp/lib dpcpp/lib "libpi_level_zero*")
harvest(external_dpcpp dpcpp/lib/clang dpcpp/lib/clang "*")
endif()

@ -145,4 +145,8 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_embree embree/include embree/include "*.h")
harvest(external_embree embree/lib embree/lib "*.a")
harvest_rpath_lib(external_embree embree/lib embree/lib "*${SHAREDLIBEXT}*")
endif()

@ -30,23 +30,28 @@ ExternalProject_Add(external_epoxy
INSTALL_COMMAND ninja install
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_epoxy after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/epoxy/include
${HARVEST_TARGET}/epoxy/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/epoxy/bin/epoxy-0.dll
${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/epoxy/lib/epoxy.lib
${HARVEST_TARGET}/epoxy/lib/epoxy.lib
DEPENDEES install
)
endif()
add_dependencies(
external_epoxy
# Needed for `MESON`.
external_python_site_packages
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_epoxy after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/epoxy/include
${HARVEST_TARGET}/epoxy/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/epoxy/bin/epoxy-0.dll
${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/epoxy/lib/epoxy.lib
${HARVEST_TARGET}/epoxy/lib/epoxy.lib
DEPENDEES install
)
endif()
else()
harvest(external_epoxy epoxy/include epoxy/include "*.h")
harvest(external_epoxy epoxy/lib epoxy/lib "*.a")
endif()

@ -260,15 +260,20 @@ if(UNIX)
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/ffmpeg/include
${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/ffmpeg/bin
${HARVEST_TARGET}/ffmpeg/lib
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_ffmpeg after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/ffmpeg/include
${HARVEST_TARGET}/ffmpeg/include
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/ffmpeg/bin
${HARVEST_TARGET}/ffmpeg/lib
DEPENDEES install
)
DEPENDEES install
)
endif()
else()
harvest(external_ffmpeg ffmpeg/include ffmpeg/include "*.h")
harvest(external_ffmpeg ffmpeg/lib ffmpeg/lib "*.a")
endif()

@ -55,7 +55,7 @@ endmacro()
fftw_build(double)
fftw_build(float --enable-float)
if(MSVC)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3_double after_install
COMMAND ${CMAKE_COMMAND} -E copy
@ -79,5 +79,13 @@ if(MSVC)
DEPENDEES install
)
endif()
else()
add_custom_target(external_fftw)
add_dependencies(
external_fftw
external_fftw3_double
external_fftw3_float)
harvest(external_fftw3 fftw3/include fftw3/include "*.h")
harvest(external_fftw3 fftw3/lib fftw3/lib "*.a")
endif()

@ -23,6 +23,8 @@ if(NOT WIN32)
INSTALL_DIR ${LIBDIR}/flac
)
harvest(external_flac flac/lib sndfile/lib "libFLAC.a")
else()
set(FLAC_CXX_FLAGS "-DFLAC__NO_DLL=ON")
@ -52,9 +54,7 @@ else()
INSTALL_DIR ${LIBDIR}/flac
)
endif()
if(MSVC)
add_dependencies(
external_flac
external_ogg

@ -36,7 +36,8 @@ add_dependencies(
external_zlib
)
if(BUILD_MODE STREQUAL Release AND WIN32)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_freetype after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/freetype
@ -50,4 +51,8 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_freetype freetype/include freetype/include "*.h")
harvest(external_freetype freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
endif()

@ -34,15 +34,20 @@ add_dependencies(
external_python_site_packages
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_fribidi after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/fribidi/include
${HARVEST_TARGET}/fribidi/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/fribidi/lib/libfribidi.a
${HARVEST_TARGET}/fribidi/lib/libfribidi.lib
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fribidi after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/fribidi/include
${HARVEST_TARGET}/fribidi/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/fribidi/lib/libfribidi.a
${HARVEST_TARGET}/fribidi/lib/libfribidi.lib
DEPENDEES install
)
DEPENDEES install
)
endif()
else()
harvest(external_fribidi fribidi/include fribidi/include "*.h")
harvest(external_fribidi fribidi/lib fribidi/lib "*.a")
endif()

@ -160,5 +160,7 @@ if(WIN32)
DEPENDEES install
)
else()
harvest(external_gmp gmp/include gmp/include "*.h")
harvest(external_gmp gmp/lib gmp/lib "*.a")
endif()

@ -53,24 +53,29 @@ add_dependencies(
external_python_site_packages
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_harfbuzz after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/harfbuzz/include
${HARVEST_TARGET}/harfbuzz/include
# We do not use the subset API currently, so copying only the main library will suffice for now
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/harfbuzz/lib/libharfbuzz.a
${HARVEST_TARGET}/harfbuzz/lib/libharfbuzz.lib
DEPENDEES install
)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_harfbuzz after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/harfbuzz/include
${HARVEST_TARGET}/harfbuzz/include
# We do not use the subset API currently, so copying only the main library will suffice for now
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/harfbuzz/lib/libharfbuzz.a
${HARVEST_TARGET}/harfbuzz/lib/libharfbuzz.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_harfbuzz after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/harfbuzz/lib/libharfbuzz.a
${HARVEST_TARGET}/harfbuzz/lib/libharfbuzz_d.lib
DEPENDEES install
)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_harfbuzz after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/harfbuzz/lib/libharfbuzz.a
${HARVEST_TARGET}/harfbuzz/lib/libharfbuzz_d.lib
DEPENDEES install
)
endif()
else()
harvest(external_harfbuzz harfbuzz/include harfbuzz/include "*.h")
harvest(external_harfbuzz harfbuzz/lib harfbuzz/lib "*.a")
endif()

@ -39,4 +39,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_haru haru/include haru/include "*.h")
harvest(external_haru haru/lib haru/lib "*.a")
endif()

@ -35,7 +35,7 @@ if(WIN32)
else()
function(harvest from to)
function(harvest project from to)
set(pattern "")
foreach(f ${ARGN})
set(pattern ${f})
@ -78,8 +78,8 @@ else()
set(set_rpath_cmd patchelf --set-rpath $ORIGIN)
endif()
function(harvest_rpath_lib from to pattern)
harvest(${from} ${to} ${pattern})
function(harvest_rpath_lib project from to pattern)
harvest(project ${from} ${to} ${pattern})
install(CODE "\
cmake_policy(SET CMP0009 NEW)\n
@ -92,8 +92,8 @@ else()
endfunction()
# Set rpath on utility binaries assuming they are run from their install location.
function(harvest_rpath_bin from to pattern)
harvest(${from} ${to} ${pattern})
function(harvest_rpath_bin project from to pattern)
harvest(project ${from} ${to} ${pattern})
install(CODE "\
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
@ -104,8 +104,8 @@ else()
# Set rpath on Python module to point to the shared libraries folder in the Blender
# installation.
function(harvest_rpath_python from to pattern)
harvest(${from} ${to} ${pattern})
function(harvest_rpath_python project from to pattern)
harvest(project ${from} ${to} ${pattern})
install(CODE "\
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}\.so*) \n
@ -121,209 +121,4 @@ else()
endif()\n
endforeach()")
endfunction()
harvest(alembic/include alembic/include "*.h")
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
harvest_rpath_bin(alembic/bin alembic/bin "*")
harvest(brotli/include brotli/include "*.h")
harvest(brotli/lib brotli/lib "*.a")
harvest(boost/include boost/include "*")
harvest_rpath_lib(boost/lib boost/lib "*${SHAREDLIBEXT}*")
harvest(imath/include imath/include "*.h")
harvest_rpath_lib(imath/lib imath/lib "*${SHAREDLIBEXT}*")
harvest(ffmpeg/include ffmpeg/include "*.h")
harvest(ffmpeg/lib ffmpeg/lib "*.a")
harvest(fftw3/include fftw3/include "*.h")
harvest(fftw3/lib fftw3/lib "*.a")
harvest(flac/lib sndfile/lib "libFLAC.a")
harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(fribidi/include fribidi/include "*.h")
harvest(fribidi/lib fribidi/lib "*.a")
harvest(epoxy/include epoxy/include "*.h")
harvest(epoxy/lib epoxy/lib "*.a")
harvest(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(harfbuzz/include harfbuzz/include "*.h")
harvest(harfbuzz/lib harfbuzz/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpeg/include jpeg/include "*.h")
harvest(jpeg/lib jpeg/lib "libjpeg.a")
harvest(lame/lib ffmpeg/lib "*.a")
if(NOT APPLE)
harvest(level-zero/include/level_zero level-zero/include/level_zero "*.h")
harvest(level-zero/lib level-zero/lib "*${SHAREDLIBEXT}*")
endif()
harvest(llvm/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(llvm/bin llvm/bin "clang-tidy")
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(llvm/include llvm/include "*")
harvest(llvm/bin llvm/bin "llvm-config")
harvest(llvm/lib llvm/lib "libLLVM*.a")
harvest(llvm/lib llvm/lib "libclang*.a")
harvest(llvm/lib/clang llvm/lib/clang "*.h")
if(APPLE)
harvest(openmp/lib openmp/lib "libomp.dylib")
harvest(openmp/include openmp/include "*.h")
endif()
if(BLENDER_PLATFORM_ARM)
harvest(sse2neon sse2neon "*.h")
endif()
harvest(ogg/lib ffmpeg/lib "*.a")
harvest(openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(openal/lib openal/lib "*.a")
harvest(zlib/include zlib/include "*.h")
harvest(zlib/lib zlib/lib "*.a")
harvest(xml2/include xml2/include "*.h")
harvest(xml2/lib xml2/lib "*.a")
harvest(
wayland-protocols/share/wayland-protocols
wayland-protocols/share/wayland-protocols/
"*.xml"
)
harvest(wayland/bin wayland/bin "wayland-scanner")
harvest(wayland/include wayland/include "*.h")
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
# Only needed for running the WESTON compositor.
harvest(wayland/lib64 wayland/lib64 "*")
harvest(
wayland_weston/
wayland_weston/
"*"
)
else()
harvest(blosc/lib openvdb/lib "*.a")
harvest(xml2/lib opencollada/lib "*.a")
endif()
harvest(opencollada/include/opencollada opencollada/include "*.h")
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
harvest(opencolorio/include opencolorio/include "*.h")
harvest_rpath_lib(opencolorio/lib opencolorio/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(
opencolorio/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*"
)
harvest(openexr/include openexr/include "*.h")
harvest_rpath_lib(openexr/lib openexr/lib "*${SHAREDLIBEXT}*")
harvest_rpath_bin(openimageio/bin openimageio/bin "idiff")
harvest_rpath_bin(openimageio/bin openimageio/bin "maketx")
harvest_rpath_bin(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest_rpath_lib(openimageio/lib openimageio/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(
openimageio/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*"
)
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest_rpath_lib(openimagedenoise/lib openimagedenoise/lib "*${SHAREDLIBEXT}*")
harvest(openimagedenoise/lib/cmake openimagedenoise/lib/cmake "*")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest_rpath_lib(embree/lib embree/lib "*${SHAREDLIBEXT}*")
harvest(openpgl/include openpgl/include "*.h")
harvest(openpgl/lib openpgl/lib "*.a")
harvest(openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
harvest(openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest_rpath_lib(opensubdiv/lib opensubdiv/lib "*${SHAREDLIBEXT}*")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
harvest_rpath_lib(openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(
openvdb/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*pyopenvdb*"
)
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest_rpath_bin(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest_rpath_lib(osl/lib osl/lib "*${SHAREDLIBEXT}*")
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")
harvest(sdl/include/SDL2 sdl/include "*.h")
harvest(sdl/lib sdl/lib "libSDL2.a")
harvest(sndfile/include sndfile/include "*.h")
harvest(sndfile/lib sndfile/lib "*.a")
harvest(spnav/include spnav/include "*.h")
harvest(spnav/lib spnav/lib "*.a")
harvest(tbb/include tbb/include "*.h")
harvest_rpath_lib(tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}*")
harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(opus/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
harvest(x265/lib ffmpeg/lib "*.a")
harvest(aom/lib ffmpeg/lib "*.a")
harvest(webp/lib webp/lib "*.a")
harvest(webp/include webp/include "*.h")
harvest(usd/include usd/include "*.h")
harvest(usd/include usd/include "*.hpp")
harvest_rpath_lib(usd/lib usd/lib "libusd_ms${SHAREDLIBEXT}")
harvest(usd/lib/usd usd/lib/usd "*")
harvest_rpath_python(
usd/lib/python/pxr
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr
"*"
)
harvest(usd/plugin usd/plugin "*")
harvest(materialx/include materialx/include "*.h")
harvest(materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
harvest_rpath_lib(materialx/lib materialx/lib "*${SHAREDLIBEXT}*")
harvest(materialx/libraries materialx/libraries "*")
harvest_rpath_python(
materialx/python/MaterialX
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX
"*"
)
# We do not need anything from the resources folder, but the MaterialX config
# file will complain if the folder does not exist, so just copy the readme.md
# files to ensure the folder will exist.
harvest(materialx/resources materialx/resources "README.md")
harvest(potrace/include potrace/include "*.h")
harvest(potrace/lib potrace/lib "*.a")
harvest(haru/include haru/include "*.h")
harvest(haru/lib haru/lib "*.a")
harvest(zstd/include zstd/include "*.h")
harvest(zstd/lib zstd/lib "*.a")
harvest(shaderc shaderc "*")
harvest(vulkan_headers vulkan "*")
harvest_rpath_lib(vulkan_loader/lib vulkan/lib "*${SHAREDLIBEXT}*")
if(APPLE)
harvest(vulkan_loader/loader vulkan/loader "*")
endif()
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
harvest(mesa/lib64 mesa/lib "*${SHAREDLIBEXT}*")
harvest(dpcpp/bin dpcpp/bin "*")
harvest(dpcpp/include dpcpp/include "*")
harvest(dpcpp/lib dpcpp/lib "libsycl*")
# avoid harvesting libpi_unified_runtime and libur_ as they're optional.
harvest(dpcpp/lib dpcpp/lib "libpi_level_zero*")
harvest(dpcpp/lib/clang dpcpp/lib/clang "*")
harvest(igc dpcpp/lib/igc "*")
harvest(ocloc dpcpp/lib/ocloc "*")
endif()
endif()

@ -92,12 +92,10 @@ set(IGC_EXTRA_ARGS
-DIGC_OPTION__ARCHITECTURE_HOST=${IGC_TARGET}
)
if(UNIX AND NOT APPLE)
list(APPEND IGC_EXTRA_ARGS
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
-DFLEX_INCLUDE_DIR=${LIBDIR}/flex/include
)
endif()
list(APPEND IGC_EXTRA_ARGS
-DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex
-DFLEX_INCLUDE_DIR=${LIBDIR}/flex/include
)
ExternalProject_Add(external_igc
URL file://${PACKAGE_DIR}/${IGC_FILE}
@ -148,11 +146,7 @@ add_dependencies(
external_igc_spirv_headers
external_igc_spirv_tools
external_igc_spirv_translator
external_flex
)
if(UNIX AND NOT APPLE)
add_dependencies(
external_igc
external_flex
)
endif()
harvest(external_igc igc dpcpp/lib/igc "*")

@ -41,4 +41,7 @@ if(WIN32)
DEPENDEES install
)
else()
harvest(external_imath imath/include imath/include "*.h")
harvest_rpath_lib(external_imath imath/lib imath/lib "*${SHAREDLIBEXT}*")
endif()

@ -22,3 +22,6 @@ ExternalProject_Add(external_jemalloc
INSTALL_DIR ${LIBDIR}/jemalloc
)
harvest(external_jemalloc jemalloc/include jemalloc/include "*.h")
harvest(external_jemalloc jemalloc/lib jemalloc/lib "*.a")

@ -61,4 +61,7 @@ else()
)
set(JPEG_LIBRARY libjpeg${LIBEXT})
harvest(external_jpeg jpeg/include jpeg/include "*.h")
harvest(external_jpeg jpeg/lib jpeg/lib "libjpeg.a")
endif()

@ -65,3 +65,7 @@ ExternalProject_Add(external_lame
INSTALL_COMMAND ${LAME_INSTALL}
INSTALL_DIR ${LIBDIR}/lame
)
if(NOT WIN32)
harvest(external_lame lame/lib ffmpeg/lib "*.a")
endif()

@ -23,11 +23,16 @@ ExternalProject_Add(external_level-zero
INSTALL_DIR ${LIBDIR}/level-zero
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_level-zero after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/level-zero
${HARVEST_TARGET}/level-zero
DEPENDEES install
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_level-zero after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/level-zero
${HARVEST_TARGET}/level-zero
DEPENDEES install
)
endif()
else()
harvest(external_level-zero level-zero/include/level_zero level-zero/include/level_zero "*.h")
harvest(external_level-zero level-zero/lib level-zero/lib "*${SHAREDLIBEXT}*")
endif()

@ -73,7 +73,7 @@ ExternalProject_Add(ll
INSTALL_DIR ${LIBDIR}/llvm
)
if(MSVC)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
set(LLVM_HARVEST_COMMAND
${CMAKE_COMMAND} -E copy_directory
@ -100,6 +100,17 @@ if(MSVC)
COMMAND ${LLVM_HARVEST_COMMAND}
DEPENDEES mkdir update patch download configure build install
)
else()
harvest(ll llvm/bin llvm/bin "clang-format")
if(BUILD_CLANG_TOOLS)
harvest(ll llvm/bin llvm/bin "clang-tidy")
harvest(ll llvm/share/clang llvm/share "run-clang-tidy.py")
endif()
harvest(ll llvm/include llvm/include "*")
harvest(ll llvm/bin llvm/bin "llvm-config")
harvest(ll llvm/lib llvm/lib "libLLVM*.a")
harvest(ll llvm/lib llvm/lib "libclang*.a")
harvest(ll llvm/lib/clang llvm/lib/clang "*.h")
endif()
# We currently do not build libxml2 on Windows.

@ -84,6 +84,21 @@ if(WIN32)
endif()
unset(MATERIALX_PYTHON_TARGET)
unset(MATERIALX_PYTHON_TARGET_DOS)
else()
harvest(external_materialx materialx/include materialx/include "*.h")
# CMake files first because harvest_rpath_lib edits them.
harvest(external_materialx materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
harvest_rpath_lib(external_materialx materialx/lib materialx/lib "*${SHAREDLIBEXT}*")
harvest(external_materialx materialx/libraries materialx/libraries "*")
harvest_rpath_python(external_materialx
materialx/python/MaterialX
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX
"*"
)
# We do not need anything from the resources folder, but the MaterialX config
# file will complain if the folder does not exist, so just copy the readme.md
# files to ensure the folder will exist.
harvest(external_materialx materialx/resources materialx/resources "README.md")
endif()
add_dependencies(

@ -73,3 +73,6 @@ add_dependencies(
# Needed for `MESON`.
external_python_site_packages
)
harvest(external_mesa libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
harvest(external_mesa mesa/lib64 mesa/lib "*${SHAREDLIBEXT}*")

@ -33,3 +33,5 @@ add_dependencies(
external_igc
external_gmmlib
)
harvest(external_ocloc ocloc dpcpp/lib/ocloc "*")

@ -14,3 +14,7 @@ ExternalProject_Add(external_ogg
INSTALL_DIR ${LIBDIR}/ogg
)
if(NOT WIN32)
harvest(external_ogg ogg/lib ffmpeg/lib "*.a")
endif()

@ -59,6 +59,10 @@ if(BUILD_MODE STREQUAL Release)
DEPENDEES install
)
else()
harvest(external_openal openal/include openal/include "*.h")
if(UNIX AND NOT APPLE)
harvest(external_openal openal/lib openal/lib "*.a")
endif()
endif()
endif()

@ -77,4 +77,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_opencollada opencollada/include/opencollada opencollada/include "*.h")
harvest(external_opencollada opencollada/lib/opencollada opencollada/lib "*.a")
endif()

@ -134,4 +134,13 @@ else()
DEPENDEES install
)
harvest(external_opencolorio opencolorio/include opencolorio/include "*.h")
harvest_rpath_lib(external_opencolorio opencolorio/lib opencolorio/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(
external_opencolorio
opencolorio/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*"
)
endif()

@ -65,6 +65,9 @@ if(WIN32)
DEPENDEES install
)
else()
harvest(external_openexr openexr/include openexr/include "*.h")
harvest_rpath_lib(external_openexr openexr/lib openexr/lib "*${SHAREDLIBEXT}*")
endif()
add_dependencies(

@ -114,7 +114,8 @@ if(NOT APPLE)
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/openimagedenoise/bin
@ -128,4 +129,9 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_openimagedenoise openimagedenoise/include openimagedenoise/include "*")
harvest_rpath_lib(external_openimagedenoise openimagedenoise/lib openimagedenoise/lib "*${SHAREDLIBEXT}*")
harvest(external_openimagedenoise openimagedenoise/lib/cmake/OpenImageDenoise-${OIDN_VERSION} openimagedenoise/lib/cmake/OpenImageDenoise "*.cmake")
endif()

@ -228,4 +228,15 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest_rpath_bin(external_openimageio openimageio/bin openimageio/bin "idiff")
harvest_rpath_bin(external_openimageio openimageio/bin openimageio/bin "maketx")
harvest_rpath_bin(external_openimageio openimageio/bin openimageio/bin "oiiotool")
harvest(external_openimageio openimageio/include openimageio/include "*")
harvest_rpath_lib(external_openimageio openimageio/lib openimageio/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(external_openimageio
openimageio/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*"
)
endif()

@ -37,6 +37,9 @@ if(NOT WIN32)
INSTALL_DIR ${LIBDIR}/openjpeg
)
harvest(external_openjpeg openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} openjpeg/include "*.h")
harvest(external_openjpeg openjpeg/lib openjpeg/lib "*.a")
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc

@ -35,3 +35,8 @@ add_dependencies(
external_openmp
ll
)
if(APPLE)
harvest(external_openmp openmp/lib openmp/lib "libomp.dylib")
harvest(external_openmp openmp/include openmp/include "*.h")
endif()

@ -59,4 +59,8 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_openpgl openpgl/include openpgl/include "*.h")
harvest(external_openpgl openpgl/lib openpgl/lib "*.a")
harvest(external_openpgl openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
endif()

@ -65,6 +65,9 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_opensubdiv opensubdiv/include opensubdiv/include "*.h")
harvest_rpath_lib(external_opensubdiv opensubdiv/lib opensubdiv/lib "*${SHAREDLIBEXT}*")
endif()
add_dependencies(

@ -125,4 +125,14 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(openvdb openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
harvest_rpath_lib(openvdb openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
harvest_rpath_python(
openvdb
openvdb/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*pyopenvdb*"
)
endif()

@ -36,6 +36,8 @@ if(NOT WIN32)
INSTALL_DIR ${LIBDIR}/opus
)
harvest(external_opus opus/lib ffmpeg/lib "*.a")
else()
ExternalProject_Add(external_opus
URL file://${PACKAGE_DIR}/${OPUS_FILE}

@ -140,4 +140,9 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest_rpath_bin(external_osl osl/bin osl/bin "oslc")
harvest(external_osl osl/include osl/include "*.h")
harvest_rpath_lib(external_osl osl/lib osl/lib "*${SHAREDLIBEXT}*")
harvest(external_osl osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
endif()

@ -36,25 +36,30 @@ add_dependencies(
external_zlib
)
if(WIN32 AND BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/png/include/
${HARVEST_TARGET}/png/include/
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/png/lib/libpng16_static${LIBEXT}
${HARVEST_TARGET}/png/lib/libpng${LIBEXT}
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/png/include/
${HARVEST_TARGET}/png/include/
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/png/lib/libpng16_static${LIBEXT}
${HARVEST_TARGET}/png/lib/libpng${LIBEXT}
DEPENDEES install
)
endif()
if(WIN32 AND BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/png/lib/libpng16_staticd${LIBEXT}
${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_png after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/png/lib/libpng16_staticd${LIBEXT}
${LIBDIR}/png/lib/libpng16${LIBEXT}
DEPENDEES install
)
endif()
else()
harvest(external_png png/include png/include "*.h")
harvest(external_png png/lib png/lib "*.a")
endif()

@ -31,5 +31,8 @@ if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
DEPENDEES install
)
else()
harvest(external_potrace potrace/include potrace/include "*.h")
harvest(external_potrace potrace/lib potrace/lib "*.a")
endif()
endif()

@ -37,4 +37,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_pugixml pugixml/include pugixml/include "*.hpp")
harvest(external_pugixml pugixml/lib pugixml/lib "*.a")
endif()

@ -222,4 +222,8 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_python python/bin python/bin "python${PYTHON_SHORT_VERSION}")
harvest(external_python python/include python/include "*h")
harvest(external_python python/lib python/lib "*")
endif()

@ -47,18 +47,23 @@ ExternalProject_Add(external_sdl
INSTALL_DIR ${LIBDIR}/sdl
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/include/sdl2
${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/lib
${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/bin
${HARVEST_TARGET}/sdl/lib
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_sdl after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/include/sdl2
${HARVEST_TARGET}/sdl/include
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/lib
${HARVEST_TARGET}/sdl/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/sdl/bin
${HARVEST_TARGET}/sdl/lib
DEPENDEES install
)
DEPENDEES install
)
endif()
else()
harvest(external_sdl sdl/include/SDL2 sdl/include "*.h")
harvest(external_sdl sdl/lib sdl/lib "libSDL2.a")
endif()

@ -62,4 +62,6 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_shaderc shaderc shaderc "*")
endif()

@ -50,20 +50,25 @@ ExternalProject_Add(external_sndfile
INSTALL_DIR ${LIBDIR}/sndfile
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/bin/sndfile.dll
${HARVEST_TARGET}/sndfile/lib/sndfile.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/lib/sndfile.lib
${HARVEST_TARGET}/sndfile/lib/sndfile.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/include/sndfile.h
${HARVEST_TARGET}/sndfile/include/sndfile.h
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/bin/sndfile.dll
${HARVEST_TARGET}/sndfile/lib/sndfile.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/lib/sndfile.lib
${HARVEST_TARGET}/sndfile/lib/sndfile.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/sndfile/include/sndfile.h
${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
DEPENDEES install
)
endif()
else()
harvest(external_sndfile sndfile/include sndfile/include "*.h")
harvest(external_sndfile sndfile/lib sndfile/lib "*.a")
endif()
add_dependencies(

@ -30,3 +30,8 @@ ExternalProject_Add(external_spnav
INSTALL_DIR ${LIBDIR}/spnav
)
if(NOT WIN32)
harvest(external_spnav spnav/include spnav/include "*.h")
harvest(external_spnav spnav/lib spnav/lib "*.a")
endif()

@ -13,9 +13,13 @@ ExternalProject_Add(external_sse2neon
INSTALL_DIR ${LIBDIR}/sse2neon
)
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sse2neon after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sse2neon ${HARVEST_TARGET}/sse2neon
DEPENDEES install
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_sse2neon after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sse2neon ${HARVEST_TARGET}/sse2neon
DEPENDEES install
)
endif()
else()
harvest(external_sse2neon sse2neon sse2neon "*.h")
endif()

@ -114,4 +114,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_tbb tbb/include tbb/include "*.h")
harvest_rpath_lib(external_tbb tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}*")
endif()

@ -40,6 +40,8 @@ if(NOT WIN32)
INSTALL_DIR ${LIBDIR}/theora
)
harvest(external_theora theora/lib ffmpeg/lib "*.a")
else()
# We are kind of naughty here and steal vorbis' `FindOgg.cmake`,
# but given it's a dependency anyway.

@ -13,6 +13,7 @@ set(TIFF_EXTRA_ARGS
-Djbig=OFF
-Dzstd=OFF
-Dwebp=OFF
-Dlerc=OFF
-Dtiff-tests=OFF
-Dsphinx=OFF
)
@ -49,4 +50,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_tiff tiff/include tiff/include "*.h")
harvest(external_tiff tiff/lib tiff/lib "*.a")
endif()

@ -181,4 +181,16 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_usd usd/include usd/include "*.h")
harvest(external_usd usd/include usd/include "*.hpp")
harvest_rpath_lib(external_usd usd/lib usd/lib "libusd_ms${SHAREDLIBEXT}")
harvest(external_usd usd/lib/usd usd/lib/usd "*")
harvest_rpath_python(
external_usd
usd/lib/python/pxr
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr
"*"
)
harvest(external_usd usd/plugin usd/plugin "*")
endif()

@ -20,3 +20,7 @@ add_dependencies(
external_vorbis
external_ogg
)
if(NOT WIN32)
harvest(external_vorbis vorbis/lib ffmpeg/lib "*.a")
endif()

@ -109,6 +109,8 @@ ExternalProject_Add(external_vpx
INSTALL_DIR ${LIBDIR}/vpx
)
if(MSVC)
if(WIN32)
set_target_properties(external_vpx PROPERTIES FOLDER Mingw)
else()
harvest(external_vpx vpx/lib ffmpeg/lib "*.a")
endif()

@ -61,7 +61,9 @@ if(UNIX AND NOT APPLE)
external_vulkan_loader
external_wayland
)
elseif(WIN32)
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_vulkan_loader after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory
@ -73,4 +75,10 @@ elseif(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_vulkan_loader vulkan_headers vulkan "*")
harvest_rpath_lib(external_vulkan_loader vulkan_loader/lib vulkan/lib "*${SHAREDLIBEXT}*")
if(APPLE)
harvest(external_vulkan_loader vulkan_loader/loader vulkan/loader "*")
endif()
endif()

@ -40,3 +40,8 @@ add_dependencies(
# Needed for `MESON`.
external_python_site_packages
)
harvest(external_wayland wayland/bin wayland/bin "wayland-scanner")
harvest(external_wayland wayland/include wayland/include "*.h")
# Only needed for running the WESTON compositor.
harvest(external_wayland wayland/lib64 wayland/lib64 "*")

@ -19,3 +19,5 @@ ExternalProject_Add(external_wayland_libdecor
INSTALL_DIR ${LIBDIR}/wayland_libdecor/include/libdecor-0
)
harvest(external_wayland_libdecor wayland_libdecor/include wayland_libdecor/include "*.h")

@ -28,3 +28,10 @@ add_dependencies(
# Needed for `MESON`.
external_python_site_packages
)
harvest(
external_wayland_protocols
wayland-protocols/share/wayland-protocols
wayland-protocols/share/wayland-protocols/
"*.xml"
)

@ -62,3 +62,5 @@ add_dependencies(
# Needed for `MESON`.
external_python_site_packages
)
harvest(external_wayland_weston wayland_weston/ wayland_weston/ "*")

@ -48,4 +48,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_webp webp/lib webp/lib "*.a")
harvest(external_webp webp/include webp/include "*.h")
endif()

@ -45,13 +45,13 @@ ExternalProject_Add(external_x264
INSTALL_DIR ${LIBDIR}/x264
)
if(MSVC)
if(WIN32)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()
if(UNIX)
else()
add_dependencies(
external_x264
external_nasm
)
harvest(external_x264 x264/lib ffmpeg/lib "*.a")
endif()

@ -174,6 +174,8 @@ execute_process(
DEPENDEES install
)
endif()
harvest(external_x265 x265/lib ffmpeg/lib "*.a")
endif()
unset(LIB_PREFIX)

@ -37,3 +37,12 @@ if(WIN32 AND BUILD_MODE STREQUAL Release)
DEPENDEES install
)
endif()
if(UNIX)
if(APPLE)
harvest(external_xml2 xml2/include xml2/include "*.h")
harvest(external_xml2 xml2/lib xml2/lib "*.a")
else()
harvest(external_xml2 xml2/lib opencollada/lib "*.a")
endif()
endif()

@ -56,4 +56,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_xr_openxr_sdk xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(external_xr_openxr_sdk xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
endif()

@ -62,3 +62,8 @@ else()
DEPENDEES install
)
endif()
if(UNIX AND NOT APPLE)
harvest(external_zlib zlib/include zlib/include "*.h")
harvest(external_zlib zlib/lib zlib/lib "*.a")
endif()

@ -44,4 +44,7 @@ if(WIN32)
DEPENDEES install
)
endif()
else()
harvest(external_zstd zstd/include zstd/include "*.h")
harvest(external_zstd zstd/lib zstd/lib "*.a")
endif()

@ -1906,6 +1906,20 @@ SpecializationBatchHandle GLShaderCompiler::precompile_specializations(
return handle;
}
GLShader::GLProgram *GLShaderCompiler::SpecializationWork::program_get()
{
for (const SpecializationConstant &constant : constants) {
const ShaderInput *input = shader->interface->constant_get(constant.name.c_str());
BLI_assert_msg(input != nullptr, "The specialization constant doesn't exists");
shader->constants.values[input->location].u = constant.value.u;
}
shader->constants.is_dirty = true;
if (shader->program_cache_.contains(shader->constants.values)) {
return &shader->program_cache_.lookup(shader->constants.values);
}
return nullptr;
}
void GLShaderCompiler::prepare_next_specialization_batch()
{
BLI_assert(current_specialization_batch.is_ready && !specialization_queue.is_empty());
@ -1920,24 +1934,20 @@ void GLShaderCompiler::prepare_next_specialization_batch()
for (auto &specialization : next.specializations) {
GLShader *sh = static_cast<GLShader *>(unwrap(specialization.shader));
for (const SpecializationConstant &constant : specialization.constants) {
const ShaderInput *input = sh->interface->constant_get(constant.name.c_str());
BLI_assert_msg(input != nullptr, "The specialization constant doesn't exists");
sh->constants.values[input->location].u = constant.value.u;
}
sh->constants.is_dirty = true;
if (sh->program_cache_.contains(sh->constants.values)) {
/* Already compiled. */
continue;
}
items.append({});
SpecializationWork &item = items.last();
item.shader = sh;
item.constants = specialization.constants;
if (item.program_get()) {
/* Already compiled. */
items.pop_last();
continue;
}
/** WORKAROUND: Set async_compilation to true, so only the sources are generated. */
sh->async_compilation_ = true;
sh->program_get();
item.program = sh->program_active_;
sh->async_compilation_ = false;
item.sources = sh->get_sources();
@ -1971,8 +1981,9 @@ bool GLShaderCompiler::specialization_batch_is_ready(SpecializationBatchHandle &
}
if (!item.do_async_compilation) {
glDeleteProgram(item.program->program_id);
item.program->program_id = 0;
GLShader::GLProgram *program = item.program_get();
glDeleteProgram(program->program_id);
program->program_id = 0;
item.shader->constants.is_dirty = true;
item.is_ready = true;
continue;
@ -1984,7 +1995,7 @@ bool GLShaderCompiler::specialization_batch_is_ready(SpecializationBatchHandle &
}
else if (item.worker->is_ready()) {
/* Retrieve the binary compiled by the worker. */
if (item.worker->load_program_binary(item.program->program_id)) {
if (item.worker->load_program_binary(item.program_get()->program_id)) {
item.is_ready = true;
}
else {

@ -299,9 +299,11 @@ class GLShaderCompiler : public ShaderCompiler {
struct SpecializationWork {
GLShader *shader = nullptr;
GLShader::GLProgram *program = nullptr;
Vector<shader::SpecializationConstant> constants;
GLSourcesBaked sources;
GLShader::GLProgram *program_get();
GLCompilerWorker *worker = nullptr;
bool do_async_compilation = false;
bool is_ready = false;