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 Jan 22, 2025
2 parents bd796df + b24d882 commit 8f36737
Show file tree
Hide file tree
Showing 199 changed files with 2,517 additions and 1,148 deletions.
31 changes: 2 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,6 @@ Try to link with static libraries, as much as possible, \
to make blender more portable across distributions"
OFF
)
if(WITH_STATIC_LIBS)
option(WITH_BOOST_ICU "\
Boost uses ICU library (required for linking with static Boost built with libicu)."
OFF
)
mark_as_advanced(WITH_BOOST_ICU)
endif()
endif()

# Misc
Expand Down Expand Up @@ -1315,9 +1308,7 @@ set_and_warn_dependency(WITH_PYTHON WITH_FREESTYLE OFF) #UPBGE
# enable boost for cycles, audaspace or i18n
# otherwise if the user disabled

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_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
if(WITH_CYCLES)
set_and_warn_dependency(WITH_BOOST WITH_CYCLES_OSL OFF)
Expand Down Expand Up @@ -1553,16 +1544,6 @@ endif()
# -----------------------------------------------------------------------------
# Common Checks for Compatible Options

if(WITH_INTERNATIONAL)
if(NOT WITH_BOOST)
message(
FATAL_ERROR
"Internationalization requires WITH_BOOST, the library may not have been found. "
"Configure BOOST or disable WITH_INTERNATIONAL"
)
endif()
endif()

# Enable SIMD support if detected by `test_sse_support()` or `test_neon_support()`.
#
if(WITH_CPU_SIMD)
Expand Down Expand Up @@ -1667,19 +1648,9 @@ if(WITH_OPENVDB)
${OPENEXR_INCLUDE_DIRS}
)

list(APPEND OPENVDB_LIBRARIES ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES})

if(WITH_OPENVDB_BLOSC)
list(APPEND OPENVDB_DEFINITIONS -DWITH_OPENVDB_BLOSC)
# Even when `WITH_OPENVDB_BLOSC` is set, `FindBlosc.cmake` isn't running.
# As this might be used at some point, check the libraries are defined.
if(DEFINED BLOSC_LIBRARIES)
list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES})
endif()
list(APPEND OPENVDB_LIBRARIES ${ZLIB_LIBRARIES})
endif()

list(APPEND OPENVDB_LIBRARIES ${BOOST_LIBRARIES} ${TBB_LIBRARIES})
endif()

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -2818,6 +2789,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_OPENCOLLADA)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_OPENIMAGEDENOISE)
info_cfg_option(WITH_OPENSUBDIV)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_POTRACE)
info_cfg_option(WITH_PUGIXML)
Expand Down Expand Up @@ -2861,6 +2833,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_IMAGE_OPENJPEG)

info_cfg_text("Audio:")
info_cfg_option(WITH_AUDASPACE)
info_cfg_option(WITH_CODEC_FFMPEG)
info_cfg_option(WITH_CODEC_SNDFILE)
info_cfg_option(WITH_COREAUDIO)
Expand Down
11 changes: 3 additions & 8 deletions build_files/cmake/platform/platform_apple.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,15 @@ if(WITH_BOOST)
set(Boost_ROOT ${LIBDIR}/boost)
set(Boost_NO_SYSTEM_PATHS ON)
set(_boost_FIND_COMPONENTS)
if(WITH_INTERNATIONAL)
list(APPEND _boost_FIND_COMPONENTS locale)
endif()
if(WITH_USD AND USD_PYTHON_SUPPORT)
list(APPEND _boost_FIND_COMPONENTS python${PYTHON_VERSION_NO_DOTS})
endif()
set(Boost_NO_WARN_NEW_VERSIONS ON)
find_package(Boost COMPONENTS ${_boost_FIND_COMPONENTS})

# Boost Python is separate to avoid linking Python into tests that don't need it.
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
# Boost Python is the only library Blender directly depends on, though USD headers.
if(WITH_USD AND USD_PYTHON_SUPPORT)
set(BOOST_PYTHON_LIBRARIES ${Boost_PYTHON${PYTHON_VERSION_NO_DOTS}_LIBRARY})
list(REMOVE_ITEM BOOST_LIBRARIES ${BOOST_PYTHON_LIBRARIES})
endif()
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_DEFINITIONS)
Expand All @@ -280,8 +275,8 @@ if(WITH_BOOST)
endif()
add_bundled_libraries(boost/lib)

if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
if(WITH_CODEC_FFMPEG)
string(APPEND PLATFORM_LINKFLAGS " -liconv") # ffmpeg needs it !
endif()

if(WITH_PUGIXML)
Expand Down
16 changes: 1 addition & 15 deletions build_files/cmake/platform/platform_unix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,9 @@ if(WITH_BOOST)
endif()
set(Boost_USE_MULTITHREADED ON)
set(__boost_packages)
if(WITH_INTERNATIONAL)
list(APPEND __boost_packages locale)
endif()
if(WITH_USD AND USD_PYTHON_SUPPORT)
list(APPEND __boost_packages python${PYTHON_VERSION_NO_DOTS})
endif()
list(APPEND __boost_packages system)
set(Boost_NO_WARN_NEW_VERSIONS ON)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
if(NOT Boost_FOUND)
Expand All @@ -489,27 +485,17 @@ if(WITH_BOOST)
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
endif()
unset(__boost_packages)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
endif()
mark_as_advanced(Boost_DIR) # why doesn't boost do this?
mark_as_advanced(Boost_INCLUDE_DIR) # why doesn't boost do this?
endif()

# Boost Python is separate to avoid linking Python into tests that don't need it.
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
# Boost Python is the only library Blender directly depends on, though USD headers.
if(WITH_USD AND USD_PYTHON_SUPPORT)
set(BOOST_PYTHON_LIBRARIES ${Boost_PYTHON${PYTHON_VERSION_NO_DOTS}_LIBRARY})
list(REMOVE_ITEM BOOST_LIBRARIES ${BOOST_PYTHON_LIBRARIES})
endif()
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")

if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
endif()
endif()
add_bundled_libraries(boost/lib)

Expand Down
13 changes: 2 additions & 11 deletions build_files/cmake/platform/platform_win32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,7 @@ if(NOT WITH_WINDOWS_FIND_MODULES)
endif()

if(WITH_BOOST)
if(WITH_INTERNATIONAL)
list(APPEND boost_extra_libs locale)
endif()
set(boost_extra_libs)
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
set(Boost_USE_MULTITHREADED ON) # suffix -mt
set(Boost_USE_STATIC_LIBS ON) # suffix -s
Expand All @@ -698,24 +696,17 @@ if(WITH_BOOST)
set(BOOST_DEBUG_POSTFIX "vc142-mt-gd-x64-${BOOST_VERSION}")
set(BOOST_PREFIX "lib")
endif()
set(BOOST_LIBRARIES)
if(EXISTS ${BOOST_34_TRIGGER_FILE})
# Boost Python is the only library Blender directly depends on, though USD headers.
if(WITH_USD)
set(BOOST_PYTHON_LIBRARIES
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python${_PYTHON_VERSION_NO_DOTS}-${BOOST_DEBUG_POSTFIX}.lib
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python${_PYTHON_VERSION_NO_DOTS}-${BOOST_POSTFIX}.lib
)
endif()
endif()
if(WITH_INTERNATIONAL)
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_locale-${BOOST_POSTFIX}.lib
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_locale-${BOOST_DEBUG_POSTFIX}.lib
)
endif()
else() # we found boost using find_package
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
endif()

Expand Down
3 changes: 0 additions & 3 deletions build_files/windows/parse_arguments.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ if NOT "%1" == "" (
set BUILD_ARCH=arm64
) else if "%1" == "2019" (
set BUILD_VS_YEAR=2019
) else if "%1" == "2019pre" (
set BUILD_VS_YEAR=2019
set VSWHERE_ARGS=-prerelease
) else if "%1" == "2019b" (
set BUILD_VS_YEAR=2019
set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
Expand Down
3 changes: 1 addition & 2 deletions build_files/windows/show_help.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ echo - debug ^(Build an unoptimized debuggable build^)
echo - packagename [newname] ^(override default cpack package name^)
echo - builddir [newdir] ^(override default build folder^)
echo - 2019 ^(build with visual studio 2019^)
echo - 2019pre ^(build with visual studio 2019 pre-release^)
echo - 2019b ^(build with visual studio 2019 Build Tools^)
echo - 2022 ^(build with visual studio 2022^)
echo - 2022pre ^(build with visual studio 2022 pre-release^)
Expand All @@ -39,6 +38,6 @@ echo.
echo Experimental options
echo - with_gpu_tests ^(enable both the render and draw gpu test suites including EEVEE, Workbench, Grease Pencil, draw manager and GPU backends^)
echo - clang ^(enable building with clang^)
echo - asan ^(enable asan when building with clang^)
echo - asan ^(enable asan^)
echo - ninja ^(enable building with ninja instead of msbuild^)
echo.
23 changes: 23 additions & 0 deletions doc/license/Boost-license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions doc/license/SPDX-license-identifiers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Corresponding SPDX license identifiers in the source code:
Apache-2.0 Apache-2-license.txt https://spdx.org/licenses/Apache-2.0.html
BSD-2-Clause BSD-2-Clause-license.txt https://spdx.org/licenses/BSD-2-Clause.html
BSD-3-Clause BSD-3-Clause-license.txt https://spdx.org/licenses/BSD-3-Clause.html
BSL-1.0 Boost-license.txt https://spdx.org/licenses/BSL-1.0.html
GPL-2.0-or-later GPL-license.txt https://spdx.org/licenses/GPL-2.0-or-later.html
GPL-3.0-or-later GPL3-license.txt https://spdx.org/licenses/GPL-3.0-or-later.html
LGPL-2.1-or-later LGPL2.1-license.txt https://spdx.org/licenses/LGPL-2.1-or-later.html
Expand Down
3 changes: 1 addition & 2 deletions extern/quadriflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ set(INC
)

set(INC_SYS
${BOOST_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIRS}
)

set(SRC
patches/boykov_kolmogorov_max_flow.hpp
src/adjacent-matrix.cpp
src/adjacent-matrix.hpp
src/compare-key.hpp
Expand Down Expand Up @@ -91,7 +91,6 @@ set(SRC
)

set(LIB
${BOOST_LIBRARIES}
)

blender_add_lib(extern_quadriflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
Loading

0 comments on commit 8f36737

Please sign in to comment.