Skip to content

Commit

Permalink
Merge remote-tracking branch 'b/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
youle31 committed Feb 6, 2025
2 parents 37479e8 + 54dc692 commit d896a73
Show file tree
Hide file tree
Showing 139 changed files with 2,105 additions and 2,423 deletions.
5 changes: 2 additions & 3 deletions build_files/build_environment/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ include(cmake/options.cmake)
# `versions.cmake` needs to be included after `options.cmake`
# due to the `BLENDER_PLATFORM_ARM` variable being needed.
include(cmake/versions.cmake)
include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
include(cmake/macros.cmake)
# `setup_msys2.cmake` to install `perl`,
Expand Down Expand Up @@ -85,8 +84,6 @@ include(cmake/materialx.cmake)
include(cmake/openvdb.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/fribidi.cmake)
include(cmake/harfbuzz.cmake)
Expand Down Expand Up @@ -187,5 +184,7 @@ include(cmake/shaderc_deps.cmake)
include(cmake/shaderc.cmake)
include(cmake/vulkan.cmake)
include(cmake/pybind11.cmake)
include(cmake/nanobind.cmake)
# Keep these last
include(cmake/deps_html.cmake)
include(cmake/cve_check.cmake)
123 changes: 0 additions & 123 deletions build_files/build_environment/cmake/boost.cmake

This file was deleted.

36 changes: 0 additions & 36 deletions build_files/build_environment/cmake/boost_build_options.cmake

This file was deleted.

4 changes: 4 additions & 0 deletions build_files/build_environment/cmake/cve_check.csv.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ vendor,product,version,cve_number,remarks,comment
@PYTHON_ID@,CVE-2009-3720,NotAffected,already fixed in libexpat version used
@PYTHON_ID@,CVE-2023-36632,NotAffected,not used in blender and not considered a bug upstream
@PYTHON_ID@,CVE-2023-27043,NotAffected,not used in blender
@PYTHON_ID@,CVE-2024-6232,FalsePositive,fixed in 3.11.10 upstream fix gh-121285
@PYTHON_ID@,CVE-2024-7592,FalsePositive,fixed in 3.11.10 upstream fix gh-123067
@PYTHON_PIP_ID@,CVE-2018-20225,NotAffected,not a blender specific issue and pip is inherently affected by malicious packages
@SSL_ID@,CVE-2009-1390,NotAffected,issue in mutt not used by blender
@SSL_ID@,CVE-2009-3765,NotAffected,issue in mutt not used by blender
Expand Down Expand Up @@ -36,4 +38,6 @@ vendor,product,version,cve_number,remarks,comment
@SQLITE_ID@,CVE-2023-7104,NotAffected,does not affect blender use of sqlite
@SQLITE_ID@,CVE-2024-0232,NotAffected,does not affect blender use of sqlite
@ZLIB_ID@,CVE-2023-45853,NotAffected,only affects minizip not used by blender
@SNDFILE_ID@,CVE-2024-50612,Mitigated,patched using upstream PR 1045
@SNDFILE_ID@,CVE-2024-50613,NotAffected,all mp3 handling in blender goes through ffmpeg
@SBOMCONTENTS@
2 changes: 1 addition & 1 deletion build_files/build_environment/cmake/download.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ download_source(ZLIB)
download_source(OPENAL)
download_source(PNG)
download_source(JPEG)
download_source(BOOST)
download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
Expand Down Expand Up @@ -181,3 +180,4 @@ download_source(VULKAN_LOADER)
download_source(PYBIND11)
download_source(DEFLATE)
download_source(HIPRT)
download_source(NANOBIND)
1 change: 1 addition & 0 deletions build_files/build_environment/cmake/dpcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ add_dependencies(
external_spirvheaders
external_unifiedruntime
external_unifiedmemoryframework
external_zstd
)

if(WIN32)
Expand Down
4 changes: 2 additions & 2 deletions build_files/build_environment/cmake/embree_windows_arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ list(GET EMBREE_INSTALLED_VCTOOLS -1 EMBREE_VCTOOLS_VERSION)

# Configure our in file and temporarily store it in the build dir
# (with modified extension so nothing else picks it up)
# This feels icky, but boost does something similar, and we haven't called
# `ExternalProject_Add` yet, so the embree dir does not yet exist.
# This feels icky, but we haven't called `ExternalProject_Add` yet,
# so the embree dir does not yet exist.
configure_file(
${PATCH_DIR}/embree_Directory.Build.Props.in
${BUILD_DIR}/embree_Directory.Build.Props_temp
Expand Down
35 changes: 35 additions & 0 deletions build_files/build_environment/cmake/nanobind.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later

set(NANOBIND_EXTRA_ARGS
-DNB_TEST=OFF
-DPython_EXECUTABLE=${PYTHON_BINARY}
)

set(NANOBIND_PATCH
${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/robinmap/include/
${BUILD_DIR}/nanobind/src/external_nanobind/ext/robin_map/include/
)

ExternalProject_Add(external_nanobind
URL file://${PACKAGE_DIR}/${NANOBIND_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NANOBIND_HASH_TYPE}=${NANOBIND_HASH}
PREFIX ${BUILD_DIR}/nanobind
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}

PATCH_COMMAND ${NANOBIND_PATCH}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanobind
${DEFAULT_CMAKE_FLAGS}
${NANOBIND_EXTRA_ARGS}

INSTALL_DIR ${LIBDIR}/nanobind
)

add_dependencies(
external_nanobind
external_robinmap
)
1 change: 1 addition & 0 deletions build_files/build_environment/cmake/numpy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ExternalProject_Add(external_numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_IN_SOURCE 1

BUILD_COMMAND
${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py
Expand Down
8 changes: 4 additions & 4 deletions build_files/build_environment/cmake/opencolorio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ if(WIN32)
${LIBDIR}/opencolorio/include
${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/bin/OpenColorIO_2_3.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_2_3.dll
${LIBDIR}/opencolorio/bin/OpenColorIO_2_4.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_2_4.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/opencolorio/lib
${HARVEST_TARGET}/opencolorio/lib
Expand All @@ -108,8 +108,8 @@ if(WIN32)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/bin/OpenColorIO_d_2_3.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_d_2_3.dll
${LIBDIR}/opencolorio/bin/OpenColorIO_d_2_4.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_d_2_4.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/lib/Opencolorio_d.lib
${HARVEST_TARGET}/opencolorio/lib/OpenColorIO_d.lib
Expand Down
5 changes: 4 additions & 1 deletion build_files/build_environment/cmake/openimagedenoise.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ endif()
set(ODIN_PATCH_COMMAND
${PATCH_CMD} --verbose -p 1 -N -d
${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise <
${PATCH_DIR}/oidn.diff
${PATCH_DIR}/oidn.diff &&
${PATCH_CMD} --verbose -p 1 -N -d
${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise <
${PATCH_DIR}/oidn_blackwell.diff
)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Expand Down
26 changes: 7 additions & 19 deletions build_files/build_environment/cmake/openimageio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,12 @@ endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILD_SHARED_LIBS=ON
${OPENIMAGEIO_LINKSTATIC}
${DEFAULT_BOOST_FLAGS}
-DREQUIRED_DEPS=WebP$<SEMICOLON>JPEGTurbo$<SEMICOLON>TIFF$<SEMICOLON>OpenEXR$<SEMICOLON>PNG$<SEMICOLON>OpenJPEG$<SEMICOLON>fmt$<SEMICOLON>Robinmap$<SEMICOLON>ZLIB$<SEMICOLON>pugixml$<SEMICOLON>Python
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DOpenImageIO_REQUIRED_DEPS=WebP$<SEMICOLON>JPEGTurbo$<SEMICOLON>TIFF$<SEMICOLON>OpenEXR$<SEMICOLON>PNG$<SEMICOLON>OpenJPEG$<SEMICOLON>fmt$<SEMICOLON>Robinmap$<SEMICOLON>ZLIB$<SEMICOLON>pugixml$<SEMICOLON>Python
-DUSE_NUKE=OFF
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=ON
-DUSE_QT=OFF
-DUSE_PYTHON=ON
Expand All @@ -71,7 +66,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_JXL=OFF
-DUSE_OPENCOLORIO=ON
-DUSE_WEBP=ON
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
Expand All @@ -93,8 +89,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
-Dpugixml_DIR=${LIBDIR}/pugixml/lib/cmake/pugixml
-DBUILD_MISSING_ROBINMAP=OFF
-DBUILD_MISSING_FMT=OFF
-DOpenColorIO_DIR=${LIBDIR}/opencolorio/lib/cmake/OpenColorIO
-DOpenImageIO_BUILD_MISSING_DEPS=""
-DFMT_INCLUDE_DIR=${LIBDIR}/fmt/include/
-DRobinmap_ROOT=${LIBDIR}/robinmap
-DWebP_ROOT=${LIBDIR}/webp
Expand All @@ -103,6 +99,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DImath_ROOT=${LIBDIR}/imath
-Dpybind11_ROOT=${LIBDIR}/pybind11
-DPython_EXECUTABLE=${PYTHON_BINARY}
-DPython3_EXECUTABLE=${PYTHON_BINARY}
-DTBB_ROOT=${LIBDIR}/tbb
-Dlibdeflate_ROOT=${LIBDIR}/deflate
-Dfmt_ROOT=${LIBDIR}/fmt
Expand Down Expand Up @@ -134,15 +131,6 @@ ExternalProject_Add(external_openimageio
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/openimageio.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_webp.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_4062.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_4302.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_windows_arm64.diff
Expand All @@ -156,12 +144,12 @@ ExternalProject_Add(external_openimageio

add_dependencies(
external_openimageio
external_opencolorio
external_png
external_zlib
external_openexr
external_imath
external_jpeg
external_boost
external_tiff
external_pugixml
external_fmt
Expand Down
Loading

0 comments on commit d896a73

Please sign in to comment.