Compare commits
71 Commits
refactor-m
...
principled
Author | SHA1 | Date | |
---|---|---|---|
a51cc1120d | |||
fc3be9d772 | |||
3c69e952be | |||
e768b4bb76 | |||
0409b40f64 | |||
cbe28509c7 | |||
619250f7f1 | |||
45cd4c9c82 | |||
e59a413091 | |||
513b4b4423 | |||
31012b5417 | |||
5a230fccc5 | |||
dc415a8dc9 | |||
8715b550f8 | |||
b96c86ec37 | |||
0fdeb3abf6 | |||
a8869c9764 | |||
4b21e2f0ae | |||
cacd74fb3f | |||
f4b61c696b | |||
bc37e8d839 | |||
552abb838c | |||
86b8823b17 | |||
a434e78095 | |||
6f71036b28 | |||
fe3d875dab | |||
b4c5db0a1a | |||
8d9d807551 | |||
c68542de70 | |||
92725760c7 | |||
f353f129ec | |||
b2432861fa | |||
bddec1bfca | |||
498818ae66 | |||
51012a109a | |||
e39a981e79 | |||
f4b35fd4c0 | |||
cc8dce80ae | |||
3b39db8beb | |||
c8ae9ccc9c | |||
d1ab751213 | |||
eac66768b7 | |||
8dd41674b5 | |||
78faf075e4 | |||
56b865347f | |||
d1ebfc7ac8 | |||
dbdd2bb454 | |||
ea8503c0c5 | |||
6a489ee4f8 | |||
c1e80528b4 | |||
ea1419ea5e | |||
02fe81e096 | |||
e6ad504c03 | |||
a6643ed39c | |||
658885b97e | |||
c8b7e00a66 | |||
a9156fef9a | |||
5bd9e1f496 | |||
34e9898c1e | |||
978af0f2b9 | |||
49f03030e3 | |||
affa6888bf | |||
4e25121122 | |||
2fc2ab7757 | |||
690f7c1831 | |||
0b89f591b4 | |||
e034ad0174 | |||
afda0ed4ea | |||
0399badca5 | |||
49ed792a78 | |||
![]() |
191709d995 |
@@ -61,17 +61,17 @@ ContinuationIndentWidth: 4
|
||||
# This tries to match Blender's style as much as possible. One
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping: {
|
||||
AfterClass: 'false',
|
||||
AfterControlStatement: 'false',
|
||||
AfterEnum : 'false',
|
||||
AfterFunction : 'true',
|
||||
AfterNamespace : 'false',
|
||||
AfterStruct : 'false',
|
||||
AfterUnion : 'false',
|
||||
BeforeCatch : 'true',
|
||||
BeforeElse : 'true',
|
||||
IndentBraces : 'false',
|
||||
AfterObjCDeclaration: 'true',
|
||||
AfterClass: 'false'
|
||||
AfterControlStatement: 'false'
|
||||
AfterEnum : 'false'
|
||||
AfterFunction : 'true'
|
||||
AfterNamespace : 'false'
|
||||
AfterStruct : 'false'
|
||||
AfterUnion : 'false'
|
||||
BeforeCatch : 'true'
|
||||
BeforeElse : 'true'
|
||||
IndentBraces : 'false'
|
||||
AfterObjCDeclaration: 'true'
|
||||
}
|
||||
|
||||
# For switch statements, indent the cases.
|
||||
|
@@ -117,19 +117,15 @@ enable_testing()
|
||||
# Keep in sync with: https://wiki.blender.org/wiki/Building_Blender
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "11.0.0")
|
||||
message(FATAL_ERROR "The minimum supported version of GCC is 11.0.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "9.3.1")
|
||||
message(FATAL_ERROR "The minimum supported version of GCC is 9.3.1")
|
||||
endif()
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND ("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "8.0"))
|
||||
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
if(MSVC_VERSION VERSION_LESS "1928")
|
||||
# MSVC_VERSION is an internal version number, it doesn't map to something
|
||||
# the end user would recognize as a version. Because of this, for MSVC we do
|
||||
# not show the found number. When using our make.bat the actual VS version
|
||||
# will be displayed on the console before starting the build, anyway.
|
||||
message(FATAL_ERROR "The minimum supported version of MSVC is 2019 (16.9.16)")
|
||||
endif()
|
||||
endif()
|
||||
@@ -334,9 +330,6 @@ option(WITH_ALEMBIC "Enable Alembic Support" ON)
|
||||
# Universal Scene Description support
|
||||
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
|
||||
|
||||
# MaterialX
|
||||
option(WITH_MATERIALX "Enable MaterialX Support" OFF)
|
||||
|
||||
# 3D format support
|
||||
# Disable opencollada when we don't have precompiled libs
|
||||
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ON)
|
||||
@@ -505,14 +498,12 @@ endif()
|
||||
if(NOT APPLE)
|
||||
option(WITH_CYCLES_DEVICE_ONEAPI "Enable Cycles oneAPI compute support" OFF)
|
||||
option(WITH_CYCLES_ONEAPI_BINARIES "Enable Ahead-Of-Time compilation for Cycles oneAPI device" OFF)
|
||||
option(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION "Switch target of oneAPI implementation from SYCL devices to Host Task (single thread on CPU). This option is only for debugging purposes." OFF)
|
||||
|
||||
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html
|
||||
# acm-g10 is the target for the first Intel Arc Alchemist GPUs.
|
||||
set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "acm-g10" CACHE STRING "oneAPI Intel GPU architectures to build binaries for")
|
||||
set(CYCLES_ONEAPI_SYCL_TARGETS spir64 spir64_gen CACHE STRING "oneAPI targets to build AOT binaries for")
|
||||
|
||||
mark_as_advanced(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||
mark_as_advanced(CYCLES_ONEAPI_SPIR64_GEN_DEVICES)
|
||||
mark_as_advanced(CYCLES_ONEAPI_SYCL_TARGETS)
|
||||
endif()
|
||||
@@ -599,7 +590,7 @@ mark_as_advanced(
|
||||
# Metal
|
||||
|
||||
if(APPLE)
|
||||
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." ON)
|
||||
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." OFF)
|
||||
mark_as_advanced(WITH_METAL_BACKEND)
|
||||
else()
|
||||
set(WITH_METAL_BACKEND OFF)
|
||||
@@ -755,6 +746,11 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
|
||||
mark_as_advanced(WITH_CXX11_ABI)
|
||||
endif()
|
||||
|
||||
# Installation process.
|
||||
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
||||
mark_as_advanced(POSTINSTALL_SCRIPT)
|
||||
@@ -836,17 +832,27 @@ 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_BOOST WITH_CYCLES_OSL OFF)
|
||||
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))
|
||||
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)
|
||||
|
||||
@@ -855,10 +861,14 @@ 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)
|
||||
@@ -872,6 +882,17 @@ 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)
|
||||
@@ -1074,6 +1095,14 @@ if(WITH_CYCLES)
|
||||
"Configure OIIO or disable WITH_CYCLES"
|
||||
)
|
||||
endif()
|
||||
if(NOT WITH_BOOST)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Cycles requires WITH_BOOST, the library may not have been found. "
|
||||
"Configure BOOST or disable WITH_CYCLES"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
if(NOT WITH_LLVM)
|
||||
message(
|
||||
@@ -1689,6 +1718,12 @@ if(
|
||||
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(NOT WITH_CXX11_ABI)
|
||||
string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
||||
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||
@@ -1885,7 +1920,6 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_QUADRIFLOW)
|
||||
info_cfg_option(WITH_TBB)
|
||||
info_cfg_option(WITH_USD)
|
||||
info_cfg_option(WITH_MATERIALX)
|
||||
info_cfg_option(WITH_XR_OPENXR)
|
||||
|
||||
info_cfg_text("Compiler Options:")
|
||||
|
@@ -211,7 +211,7 @@ endif
|
||||
# Set the LIBDIR, an empty string when not found.
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU}_glibc_228)
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
|
||||
endif
|
||||
ifeq (, $(LIBDIR))
|
||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
||||
|
@@ -26,9 +26,7 @@
|
||||
|
||||
project("BlenderDependencies")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
if(POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 NEW) # CMake 3.24+ Set the date/time for extracted files to time of extraction
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
include(cmake/check_software.cmake)
|
||||
include(cmake/options.cmake)
|
||||
@@ -44,7 +42,7 @@ if(ENABLE_MINGW64)
|
||||
else()
|
||||
set(mingw_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
include(cmake/ssl.cmake)
|
||||
|
||||
include(cmake/zlib.cmake)
|
||||
include(cmake/zstd.cmake)
|
||||
include(cmake/openal.cmake)
|
||||
@@ -68,16 +66,18 @@ endif()
|
||||
if(UNIX)
|
||||
include(cmake/nasm.cmake)
|
||||
endif()
|
||||
include(cmake/openimageio.cmake)
|
||||
include(cmake/tiff.cmake)
|
||||
if(WIN32)
|
||||
include(cmake/flexbison.cmake)
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
include(cmake/flex.cmake)
|
||||
endif()
|
||||
include(cmake/osl.cmake)
|
||||
include(cmake/tbb.cmake)
|
||||
include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/llvm.cmake)
|
||||
include(cmake/osl.cmake)
|
||||
option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
|
||||
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
|
||||
set(USE_PIP_NUMPY ON)
|
||||
@@ -86,10 +86,7 @@ else()
|
||||
endif()
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/package_python.cmake)
|
||||
include(cmake/openimageio.cmake)
|
||||
include(cmake/usd.cmake)
|
||||
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.
|
||||
@@ -103,8 +100,6 @@ include(cmake/fmt.cmake)
|
||||
include(cmake/robinmap.cmake)
|
||||
include(cmake/xml2.cmake)
|
||||
|
||||
include(cmake/fribidi.cmake)
|
||||
include(cmake/harfbuzz.cmake)
|
||||
if(NOT APPLE)
|
||||
include(cmake/xr_openxr.cmake)
|
||||
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
|
||||
@@ -122,7 +117,6 @@ endif()
|
||||
include(cmake/expat.cmake)
|
||||
include(cmake/pystring.cmake)
|
||||
include(cmake/yamlcpp.cmake)
|
||||
include(cmake/minizipng.cmake)
|
||||
include(cmake/opencolorio.cmake)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
@@ -170,6 +164,7 @@ if(UNIX)
|
||||
include(cmake/bzip2.cmake)
|
||||
include(cmake/ffi.cmake)
|
||||
include(cmake/lzma.cmake)
|
||||
include(cmake/ssl.cmake)
|
||||
include(cmake/sqlite.cmake)
|
||||
endif()
|
||||
|
||||
@@ -181,9 +176,6 @@ if(UNIX AND NOT APPLE)
|
||||
include(cmake/wayland.cmake)
|
||||
include(cmake/wayland_libdecor.cmake)
|
||||
endif()
|
||||
include(cmake/shaderc_deps.cmake)
|
||||
include(cmake/shaderc.cmake)
|
||||
include(cmake/vulkan.cmake)
|
||||
include(cmake/pybind11.cmake)
|
||||
|
||||
include(cmake/harvest.cmake)
|
||||
include(cmake/cve_check.cmake)
|
||||
|
@@ -17,7 +17,6 @@ ExternalProject_Add(external_alembic
|
||||
URL file://${PACKAGE_DIR}/${ALEMBIC_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${ALEMBIC_HASH_TYPE}=${ALEMBIC_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/alembic
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/alembic -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ALEMBIC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/alembic
|
||||
@@ -42,5 +41,6 @@ endif()
|
||||
|
||||
add_dependencies(
|
||||
external_alembic
|
||||
external_openexr
|
||||
external_imath
|
||||
)
|
||||
|
@@ -38,3 +38,19 @@ if(WIN32)
|
||||
external_pthreads
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_blosc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/blosc/include/ ${HARVEST_TARGET}/blosc/include/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_blosc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -3,18 +3,8 @@
|
||||
if(WIN32)
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
|
||||
set(BOOST_BUILD_COMMAND b2)
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=shared)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
list(APPEND BOOST_BUILD_OPTIONS python-debugging=on variant=debug)
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
list(APPEND BOOST_BUILD_OPTIONS debug-symbols=off)
|
||||
else()
|
||||
list(APPEND BOOST_BUILD_OPTIONS debug-symbols=on)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND BOOST_BUILD_OPTIONS variant=release)
|
||||
endif()
|
||||
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/)
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=shared )
|
||||
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-${BOOST_VERSION_NODOTS_SHORT}/ ${HARVEST_TARGET}/boost/include/)
|
||||
endif()
|
||||
@@ -23,24 +13,28 @@ elseif(APPLE)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
else()
|
||||
set(BOOST_HARVEST_CMD echo .)
|
||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||
set(BOOST_BUILD_COMMAND ./b2)
|
||||
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
||||
set(BOOST_PATCH_COMMAND echo .)
|
||||
endif()
|
||||
|
||||
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
||||
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
|
||||
set(BOOST_PYTHON_OPTIONS
|
||||
if(WITH_BOOST_PYTHON)
|
||||
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
||||
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
|
||||
set(BOOST_PYTHON_OPTIONS
|
||||
--with-python
|
||||
--user-config=${JAM_FILE}
|
||||
)
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
)
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
set(BOOST_PYTHON_OPTIONS
|
||||
${BOOST_PYTHON_OPTIONS}
|
||||
define=BOOST_DEBUG_PYTHON
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(BOOST_OPTIONS
|
||||
@@ -70,15 +64,17 @@ ExternalProject_Add(external_boost
|
||||
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
|
||||
PREFIX ${BUILD_DIR}/boost
|
||||
UPDATE_COMMAND ""
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff
|
||||
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
|
||||
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=shared threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=static threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
if(WITH_BOOST_PYTHON)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
external_python
|
||||
external_numpy
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
@@ -20,12 +20,11 @@ endif()
|
||||
set(DEFAULT_BOOST_FLAGS
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=OFF
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DBoost_ADDITIONAL_VERSIONS=${BOOST_VERSION_SHORT}
|
||||
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
|
||||
-DBoost_USE_DEBUG_PYTHON=On
|
||||
)
|
||||
|
@@ -12,18 +12,13 @@ if(UNIX)
|
||||
automake
|
||||
bison
|
||||
${_libtoolize_name}
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
tclsh
|
||||
yasm
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND _required_software dos2unix)
|
||||
else()
|
||||
list(APPEND _required_software patchelf)
|
||||
endif()
|
||||
|
||||
foreach(_software ${_required_software})
|
||||
find_program(_software_find NAMES ${_software})
|
||||
if(NOT _software_find)
|
||||
@@ -51,10 +46,10 @@ if(UNIX)
|
||||
" ${_software_missing}\n"
|
||||
"\n"
|
||||
"On Debian and Ubuntu:\n"
|
||||
" apt install autoconf automake bison libtool yasm tcl ninja-build meson python3-mako patchelf\n"
|
||||
" apt install autoconf automake bison libtool yasm tcl ninja-build meson python3-mako\n"
|
||||
"\n"
|
||||
"On macOS (with homebrew):\n"
|
||||
" brew install autoconf automake bison dos2unix flex libtool meson ninja pkg-config yasm\n"
|
||||
" brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n"
|
||||
"\n"
|
||||
"Other platforms:\n"
|
||||
" Install equivalent packages.\n")
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
set(SBOMCONTENTS)
|
||||
get_cmake_property(_variableNames VARIABLES)
|
||||
foreach(_variableName ${_variableNames})
|
||||
foreach (_variableName ${_variableNames})
|
||||
if(_variableName MATCHES "CPE$")
|
||||
string(REPLACE ":" ";" CPE_LIST ${${_variableName}})
|
||||
string(REPLACE "_CPE" "_ID" CPE_DEPNAME ${_variableName})
|
||||
|
@@ -16,24 +16,23 @@ function(download_source dep)
|
||||
endif()
|
||||
# Validate all required variables are set and give an explicit error message
|
||||
# rather than CMake erroring out later on with a more ambigious error.
|
||||
if(NOT DEFINED TARGET_FILE)
|
||||
if (NOT DEFINED TARGET_FILE)
|
||||
message(FATAL_ERROR "${dep}_FILE variable not set")
|
||||
endif()
|
||||
if(NOT DEFINED TARGET_HASH)
|
||||
if (NOT DEFINED TARGET_HASH)
|
||||
message(FATAL_ERROR "${dep}_HASH variable not set")
|
||||
endif()
|
||||
if(NOT DEFINED TARGET_HASH_TYPE)
|
||||
if (NOT DEFINED TARGET_HASH_TYPE)
|
||||
message(FATAL_ERROR "${dep}_HASH_TYPE variable not set")
|
||||
endif()
|
||||
if(NOT DEFINED TARGET_URI)
|
||||
if (NOT DEFINED TARGET_URI)
|
||||
message(FATAL_ERROR "${dep}_URI variable not set")
|
||||
endif()
|
||||
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
|
||||
message("Checking source : ${dep} (${TARGET_FILE})")
|
||||
if(NOT EXISTS ${TARGET_FILE})
|
||||
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
||||
file(
|
||||
DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||
TIMEOUT 1800 # seconds
|
||||
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
|
||||
TLS_VERIFY ON
|
||||
@@ -43,11 +42,11 @@ function(download_source dep)
|
||||
if(EXISTS ${TARGET_FILE})
|
||||
# Sometimes the download fails, but that is not a
|
||||
# fail condition for "file(DOWNLOAD" it will warn about
|
||||
# a CRC mismatch and just carry on, we need to explicitly
|
||||
# a crc mismatch and just carry on, we need to explicitly
|
||||
# catch this and remove the bogus 0 byte file so we can
|
||||
# retry without having to go find the file and manually
|
||||
# delete it.
|
||||
file(SIZE ${TARGET_FILE} TARGET_SIZE)
|
||||
file (SIZE ${TARGET_FILE} TARGET_SIZE)
|
||||
if(${TARGET_SIZE} EQUAL 0)
|
||||
file(REMOVE ${TARGET_FILE})
|
||||
message(FATAL_ERROR "for ${TARGET_FILE} file size 0, download likely failed, deleted...")
|
||||
@@ -88,7 +87,6 @@ download_source(OPENSUBDIV)
|
||||
download_source(SDL)
|
||||
download_source(OPENCOLLADA)
|
||||
download_source(OPENCOLORIO)
|
||||
download_source(MINIZIPNG)
|
||||
download_source(LLVM)
|
||||
download_source(OPENMP)
|
||||
download_source(OPENIMAGEIO)
|
||||
@@ -127,7 +125,6 @@ download_source(SSL)
|
||||
download_source(SQLITE)
|
||||
download_source(EMBREE)
|
||||
download_source(USD)
|
||||
download_source(MATERIALX)
|
||||
download_source(OIDN)
|
||||
download_source(LIBGLU)
|
||||
download_source(MESA)
|
||||
@@ -166,12 +163,3 @@ download_source(IGC_SPIRV_TRANSLATOR)
|
||||
download_source(GMMLIB)
|
||||
download_source(OCLOC)
|
||||
download_source(AOM)
|
||||
download_source(FRIBIDI)
|
||||
download_source(HARFBUZZ)
|
||||
download_source(SHADERC)
|
||||
download_source(SHADERC_SPIRV_TOOLS)
|
||||
download_source(SHADERC_SPIRV_HEADERS)
|
||||
download_source(SHADERC_GLSLANG)
|
||||
download_source(VULKAN_HEADERS)
|
||||
download_source(VULKAN_LOADER)
|
||||
download_source(PYBIND11)
|
||||
|
@@ -1,9 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# LLVM does not switch over to cpp17 until llvm 16 and building ealier versions with
|
||||
# MSVC is leading to some crashes in ISPC. Switch back to their default on all platforms
|
||||
# for now.
|
||||
string(REPLACE "-DCMAKE_CXX_STANDARD=17" " " DPCPP_CMAKE_FLAGS "${DEFAULT_CMAKE_FLAGS}")
|
||||
|
||||
if(WIN32)
|
||||
set(LLVM_GENERATOR "Ninja")
|
||||
@@ -83,7 +79,7 @@ ExternalProject_Add(external_dpcpp
|
||||
CMAKE_GENERATOR ${LLVM_GENERATOR}
|
||||
SOURCE_SUBDIR llvm
|
||||
LIST_SEPARATOR ^^
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DPCPP_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DEFAULT_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS}
|
||||
# CONFIGURE_COMMAND
|
||||
# ${PYTHON_BINARY}
|
||||
# ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS}
|
||||
|
@@ -15,11 +15,10 @@ set(EMBREE_EXTRA_ARGS
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
)
|
||||
|
||||
if(NOT BLENDER_PLATFORM_ARM)
|
||||
if (NOT BLENDER_PLATFORM_ARM)
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
-DEMBREE_MAX_ISA=AVX2
|
||||
)
|
||||
-DEMBREE_MAX_ISA=AVX2)
|
||||
endif()
|
||||
|
||||
if(TBB_STATIC_LIBRARY)
|
||||
@@ -64,6 +63,6 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -10,7 +10,7 @@ ExternalProject_Add(external_epoxy
|
||||
URL_HASH ${EPOXY_HASH_TYPE}=${EPOXY_HASH}
|
||||
PREFIX ${BUILD_DIR}/epoxy
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/epoxy/src/external_epoxy/ < ${PATCH_DIR}/epoxy.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${MESON} setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && meson setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
@@ -23,9 +23,3 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_epoxy
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -1,55 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(temp_LIBDIR ${mingw_LIBDIR})
|
||||
else()
|
||||
set(temp_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
|
||||
set(FFMPEG_CFLAGS "\
|
||||
-I${temp_LIBDIR}/lame/include \
|
||||
-I${temp_LIBDIR}/openjpeg/include/ \
|
||||
-I${temp_LIBDIR}/ogg/include \
|
||||
-I${temp_LIBDIR}/vorbis/include \
|
||||
-I${temp_LIBDIR}/theora/include \
|
||||
-I${temp_LIBDIR}/opus/include \
|
||||
-I${temp_LIBDIR}/vpx/include \
|
||||
-I${temp_LIBDIR}/x264/include \
|
||||
-I${temp_LIBDIR}/xvidcore/include \
|
||||
-I${temp_LIBDIR}/zlib/include \
|
||||
-I${temp_LIBDIR}/aom/include"
|
||||
)
|
||||
set(FFMPEG_LDFLAGS "\
|
||||
-L${temp_LIBDIR}/lame/lib \
|
||||
-L${temp_LIBDIR}/openjpeg/lib \
|
||||
-L${temp_LIBDIR}/ogg/lib \
|
||||
-L${temp_LIBDIR}/vorbis/lib \
|
||||
-L${temp_LIBDIR}/theora/lib \
|
||||
-L${temp_LIBDIR}/opus/lib \
|
||||
-L${temp_LIBDIR}/vpx/lib \
|
||||
-L${temp_LIBDIR}/x264/lib \
|
||||
-L${temp_LIBDIR}/xvidcore/lib \
|
||||
-L${temp_LIBDIR}/zlib/lib \
|
||||
-L${temp_LIBDIR}/aom/lib"
|
||||
)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
--pkg-config-flags=--static
|
||||
--extra-cflags=${FFMPEG_CFLAGS}
|
||||
--extra-ldflags=${FFMPEG_LDFLAGS}
|
||||
)
|
||||
set(FFMPEG_ENV "PKG_CONFIG_PATH=\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/x264/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/ogg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/vpx/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/theora/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/opus/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/aom/lib/pkgconfig"
|
||||
)
|
||||
|
||||
unset(temp_LIBDIR)
|
||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include -I${mingw_LIBDIR}/aom/include")
|
||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib -L${mingw_LIBDIR}/aom/lib")
|
||||
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
|
||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR}/aom/lib/pkgconfig:)
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
|
@@ -1,8 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(FMT_EXTRA_ARGS
|
||||
-DFMT_TEST=OFF
|
||||
-DFMT_DOC=OFF
|
||||
-DFMT_TEST=Off
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_fmt
|
||||
|
@@ -32,10 +32,6 @@ add_dependencies(
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_freetype after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
|
||||
# harfbuzz *NEEDS* to find freetype.lib and will not be conviced to take alternative names so just give it
|
||||
# what it wants.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/freetype/lib/freetype2st.lib ${LIBDIR}/freetype/lib/freetype.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,31 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(CONFIGURE_ENV ${CONFIGURE_ENV_MSVC})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_fribidi
|
||||
URL file://${PACKAGE_DIR}/${FRIBIDI_FILE}
|
||||
URL_HASH ${FRIBIDI_HASH_TYPE}=${FRIBIDI_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/fribidi
|
||||
CONFIGURE_COMMAND ${MESON} setup --prefix ${LIBDIR}/fribidi -Ddocs=false --default-library static --libdir lib ${BUILD_DIR}/fribidi/src/external_fribidi-build ${BUILD_DIR}/fribidi/src/external_fribidi
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
INSTALL_DIR ${LIBDIR}/fribidi
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_fribidi
|
||||
external_python
|
||||
# Needed for `MESON`.
|
||||
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
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
@@ -22,14 +22,6 @@ elseif(UNIX AND NOT APPLE)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Boolean crashes with Arm assembly, see T103423.
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(GMP_OPTIONS
|
||||
${GMP_OPTIONS}
|
||||
--disable-assembly
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_gmp
|
||||
URL file://${PACKAGE_DIR}/${GMP_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
@@ -53,16 +45,14 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -1,61 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(HARFBUZZ_CONFIGURE_ENV ${CONFIGURE_ENV_MSVC})
|
||||
set(HARFBUZZ_PKG_ENV FREETYPE_DIR=${LIBDIR}/freetype)
|
||||
else()
|
||||
set(HARFBUZZ_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
set(HARFBUZZ_PKG_ENV "PKG_CONFIG_PATH=\
|
||||
${LIBDIR}/freetype/lib/pkgconfig:\
|
||||
${LIBDIR}/brotli/lib/pkgconfig:\
|
||||
${LIBDIR}/lib/python3.10/pkgconfig:\
|
||||
$PKG_CONFIG_PATH"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(HARFBUZZ_EXTRA_OPTIONS
|
||||
-Dtests=disabled
|
||||
-Dfreetype=enabled
|
||||
-Dglib=disabled
|
||||
-Dgobject=disabled
|
||||
# Only used for command line utilities,
|
||||
# disable as this would add an addition & unnecessary build-dependency.
|
||||
-Dcairo=disabled
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_harfbuzz
|
||||
URL file://${PACKAGE_DIR}/${HARFBUZZ_FILE}
|
||||
URL_HASH ${HARFBUZZ_HASH_TYPE}=${HARFBUZZ_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/harfbuzz
|
||||
|
||||
CONFIGURE_COMMAND ${HARFBUZZ_CONFIGURE_ENV} &&
|
||||
${CMAKE_COMMAND} -E env ${HARFBUZZ_PKG_ENV}
|
||||
${MESON} setup
|
||||
--prefix ${LIBDIR}/harfbuzz ${HARFBUZZ_EXTRA_OPTIONS}
|
||||
--default-library static
|
||||
--libdir lib
|
||||
${BUILD_DIR}/harfbuzz/src/external_harfbuzz-build
|
||||
${BUILD_DIR}/harfbuzz/src/external_harfbuzz
|
||||
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
INSTALL_DIR ${LIBDIR}/harfbuzz
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_harfbuzz
|
||||
external_python
|
||||
external_freetype
|
||||
# Needed for `MESON`.
|
||||
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()
|
@@ -13,16 +13,15 @@ if(WIN32)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_target(Harvest_Release_Results
|
||||
COMMAND # JPEG rename lib-file + copy include.
|
||||
COMMAND # jpeg rename libfile + copy include
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpeg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
||||
# PNG.
|
||||
# png
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
||||
# FREEGLUT -> OPENGL.
|
||||
# freeglut-> opengl
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||
|
||||
DEPENDS
|
||||
)
|
||||
endif()
|
||||
@@ -53,82 +52,19 @@ else()
|
||||
PATTERN "cmake" EXCLUDE
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
PATTERN "tests" EXCLUDE
|
||||
PATTERN "meson*" EXCLUDE
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Set rpath on shared libraries to $ORIGIN since all will be installed in the same
|
||||
# lib folder, and remove any absolute paths.
|
||||
#
|
||||
# Ideally this would be done as part of the Blender build since it makes assumptions
|
||||
# about where the files will be installed. However it would add patchelf as a new
|
||||
# dependency for building.
|
||||
#
|
||||
# Also removes versioned symlinks, which give errors with macOS notarization.
|
||||
if(APPLE)
|
||||
set(set_rpath_cmd python3 ${CMAKE_CURRENT_SOURCE_DIR}/darwin/set_rpath.py @loader_path)
|
||||
else()
|
||||
set(set_rpath_cmd patchelf --set-rpath $ORIGIN)
|
||||
endif()
|
||||
|
||||
function(harvest_rpath_lib from to pattern)
|
||||
harvest(${from} ${to} ${pattern})
|
||||
|
||||
install(CODE "\
|
||||
cmake_policy(SET CMP0009 NEW)\n
|
||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
||||
foreach(f \${shared_libs}) \n
|
||||
if(IS_SYMLINK \${f})\n
|
||||
if(APPLE)\n
|
||||
file(REMOVE_RECURSE \${f})
|
||||
endif()\n
|
||||
else()\n
|
||||
execute_process(COMMAND ${set_rpath_cmd} \${f}) \n
|
||||
endif()\n
|
||||
endforeach()")
|
||||
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})
|
||||
|
||||
install(CODE "\
|
||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
||||
foreach(f \${shared_libs}) \n
|
||||
execute_process(COMMAND ${set_rpath_cmd}/../lib; \${f}) \n
|
||||
endforeach()")
|
||||
endfunction()
|
||||
|
||||
# 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})
|
||||
|
||||
install(CODE "\
|
||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}\.so*) \n
|
||||
foreach(f \${shared_libs}) \n
|
||||
if(IS_SYMLINK \${f})\n
|
||||
if(APPLE)\n
|
||||
file(REMOVE_RECURSE \${f})
|
||||
endif()\n
|
||||
else()\n
|
||||
get_filename_component(f_dir \${f} DIRECTORY) \n
|
||||
file(RELATIVE_PATH relative_dir \${f_dir} ${HARVEST_TARGET}) \n
|
||||
execute_process(COMMAND ${set_rpath_cmd}/\${relative_dir}../lib \${f}) \n
|
||||
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(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(boost/lib boost/lib "*.a")
|
||||
harvest(imath/include imath/include "*.h")
|
||||
harvest_rpath_lib(imath/lib imath/lib "*${SHAREDLIBEXT}*")
|
||||
harvest(imath/lib imath/lib "*.a")
|
||||
harvest(ffmpeg/include ffmpeg/include "*.h")
|
||||
harvest(ffmpeg/lib ffmpeg/lib "*.a")
|
||||
harvest(fftw3/include fftw3/include "*.h")
|
||||
@@ -136,14 +72,10 @@ else()
|
||||
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")
|
||||
@@ -151,7 +83,7 @@ else()
|
||||
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}*")
|
||||
harvest(level-zero/lib level-zero/lib "*.so*")
|
||||
endif()
|
||||
harvest(llvm/bin llvm/bin "clang-format")
|
||||
if(BUILD_CLANG_TOOLS)
|
||||
@@ -164,7 +96,7 @@ else()
|
||||
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/lib openmp/lib "*")
|
||||
harvest(openmp/include openmp/include "*.h")
|
||||
endif()
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
@@ -175,17 +107,16 @@ else()
|
||||
if(UNIX AND NOT APPLE)
|
||||
harvest(openal/lib openal/lib "*.a")
|
||||
|
||||
harvest(blosc/include blosc/include "*.h")
|
||||
harvest(blosc/lib blosc/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-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")
|
||||
@@ -196,24 +127,15 @@ else()
|
||||
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(opencolorio/lib opencolorio/lib "*.a")
|
||||
harvest(opencolorio/lib/static opencolorio/lib "*.a")
|
||||
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(openexr/lib openexr/lib "*.a")
|
||||
harvest(openimageio/bin openimageio/bin "idiff")
|
||||
harvest(openimageio/bin openimageio/bin "maketx")
|
||||
harvest(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(openimageio/lib openimageio/lib "*.a")
|
||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
@@ -224,18 +146,13 @@ else()
|
||||
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(opensubdiv/lib opensubdiv/lib "*.a")
|
||||
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(openvdb/lib openvdb/lib "*.a")
|
||||
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/bin osl/bin "oslc")
|
||||
harvest(osl/include osl/include "*.h")
|
||||
harvest(osl/lib osl/lib "*.a")
|
||||
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
|
||||
@@ -253,7 +170,7 @@ else()
|
||||
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(tbb/lib/libtbb_static.a tbb/lib/libtbb.a)
|
||||
harvest(theora/lib ffmpeg/lib "*.a")
|
||||
harvest(tiff/include tiff/include "*.h")
|
||||
harvest(tiff/lib tiff/lib "*.a")
|
||||
@@ -266,46 +183,22 @@ else()
|
||||
harvest(webp/lib webp/lib "*.a")
|
||||
harvest(webp/include webp/include "*.h")
|
||||
harvest(usd/include usd/include "*.h")
|
||||
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_rpath_lib(materialx/lib materialx/lib "*${SHAREDLIBEXT}*")
|
||||
harvest(materialx/libraries materialx/libraries "*")
|
||||
harvest(materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
|
||||
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(libglu/lib mesa/lib "*.so*")
|
||||
harvest(mesa/lib64 mesa/lib "*.so*")
|
||||
|
||||
harvest(dpcpp dpcpp "*")
|
||||
harvest(igc dpcpp/lib/igc "*")
|
||||
harvest(ocloc dpcpp/lib/ocloc "*")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(IMATH_EXTRA_ARGS
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DIMATH_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
|
||||
)
|
||||
@@ -11,7 +11,6 @@ ExternalProject_Add(external_imath
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${IMATH_HASH_TYPE}=${IMATH_HASH}
|
||||
PREFIX ${BUILD_DIR}/imath
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/imath ${DEFAULT_CMAKE_FLAGS} ${IMATH_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/imath
|
||||
)
|
||||
@@ -20,7 +19,6 @@ if(WIN32)
|
||||
ExternalProject_Add_Step(external_imath after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/imath/lib ${HARVEST_TARGET}/imath/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/imath/include ${HARVEST_TARGET}/imath/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/imath/bin/imath${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/imath/bin/imath${OPENEXR_VERSION_POSTFIX}.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -13,11 +13,9 @@ if(APPLE)
|
||||
)
|
||||
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
|
||||
set(BUILD_CLANG_TOOLS ON)
|
||||
else()
|
||||
# NVIDIA PTX for OSL on Windows and Linux.
|
||||
set(LLVM_TARGETS ${LLVM_TARGETS}$<SEMICOLON>NVPTX)
|
||||
endif()
|
||||
|
||||
|
||||
set(LLVM_EXTRA_ARGS
|
||||
-DLLVM_USE_CRT_RELEASE=MD
|
||||
-DLLVM_USE_CRT_DEBUG=MDd
|
||||
@@ -40,11 +38,6 @@ else()
|
||||
set(LLVM_GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
||||
# LLVM does not switch over to cpp17 until llvm 16 and building ealier versions with
|
||||
# MSVC is leading to some crashes in ISPC. Switch back to their default on all platforms
|
||||
# for now.
|
||||
string(REPLACE "-DCMAKE_CXX_STANDARD=17" " " LLVM_CMAKE_FLAGS "${DEFAULT_CMAKE_FLAGS}")
|
||||
|
||||
# short project name due to long filename issues on windows
|
||||
ExternalProject_Add(ll
|
||||
URL file://${PACKAGE_DIR}/${LLVM_FILE}
|
||||
@@ -55,7 +48,7 @@ ExternalProject_Add(ll
|
||||
PREFIX ${BUILD_DIR}/ll
|
||||
SOURCE_SUBDIR llvm
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${LLVM_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/llvm
|
||||
)
|
||||
|
||||
|
@@ -1,57 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(MATERIALX_EXTRA_ARGS
|
||||
-DMATERIALX_BUILD_PYTHON=ON
|
||||
-DMATERIALX_BUILD_RENDER=OFF
|
||||
-DMATERIALX_INSTALL_PYTHON=OFF
|
||||
-DMATERIALX_PYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DMATERIALX_PYTHON_VERSION=${PYTHON_SHORT_VERSION}
|
||||
-DMATERIALX_BUILD_SHARED_LIBS=ON
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-Dpybind11_ROOT=${LIBDIR}/pybind11
|
||||
-DPython_EXECUTABLE=${PYTHON_BINARY}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_materialx
|
||||
URL file://${PACKAGE_DIR}/${MATERIALX_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${MATERIALX_HASH_TYPE}=${MATERIALX_HASH}
|
||||
PREFIX ${BUILD_DIR}/materialx
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/materialx/src/external_materialx < ${PATCH_DIR}/materialx.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/materialx ${DEFAULT_CMAKE_FLAGS} ${MATERIALX_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/materialx
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(MATERIALX_PYTHON_TARGET ${HARVEST_TARGET}/materialx/python/${BUILD_MODE})
|
||||
string(REPLACE "/" "\\" MATERIALX_PYTHON_TARGET_DOS "${MATERIALX_PYTHON_TARGET}")
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_materialx after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/include ${HARVEST_TARGET}/materialx/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/libraries ${HARVEST_TARGET}/materialx/libraries
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/lib/ ${HARVEST_TARGET}/materialx/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/bin/ ${HARVEST_TARGET}/materialx/bin/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/python/ ${MATERIALX_PYTHON_TARGET}
|
||||
COMMAND del ${MATERIALX_PYTHON_TARGET_DOS}\\MaterialX\\*.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_materialx after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/lib/ ${HARVEST_TARGET}/materialx/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/bin/ ${HARVEST_TARGET}/materialx/bin/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/materialx/python/ ${MATERIALX_PYTHON_TARGET}
|
||||
COMMAND del ${MATERIALX_PYTHON_TARGET_DOS}\\MaterialX\\*.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
unset(MATERIALX_PYTHON_TARGET)
|
||||
unset(MATERIALX_PYTHON_TARGET_DOS)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_materialx
|
||||
external_python
|
||||
external_pybind11
|
||||
)
|
@@ -33,8 +33,6 @@ set(MESA_EXTRA_FLAGS
|
||||
# At some point we will likely want to support Wayland.
|
||||
# Disable for now since it's not officially supported.
|
||||
-Dplatforms=x11
|
||||
# Needed to find the local expat.
|
||||
--pkg-config-path=${LIBDIR}/expat/lib/pkgconfig
|
||||
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
|
||||
)
|
||||
|
||||
@@ -45,7 +43,7 @@ ExternalProject_Add(external_mesa
|
||||
PREFIX ${BUILD_DIR}/mesa
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
|
||||
${MESON} ${BUILD_DIR}/mesa/src/external_mesa-build --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
|
||||
meson ${BUILD_DIR}/mesa/src/external_mesa-build --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa-build && ninja install
|
||||
INSTALL_DIR ${LIBDIR}/mesa
|
||||
@@ -54,9 +52,4 @@ ExternalProject_Add(external_mesa
|
||||
add_dependencies(
|
||||
external_mesa
|
||||
ll
|
||||
external_zlib
|
||||
# Run-time dependency.
|
||||
external_expat
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -1,33 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(MINIZIPNG_EXTRA_ARGS
|
||||
-DMZ_FETCH_LIBS=OFF
|
||||
-DMZ_LIBCOMP=OFF
|
||||
-DMZ_PKCRYPT=OFF
|
||||
-DMZ_WZAES=OFF
|
||||
-DMZ_OPENSSL=OFF
|
||||
-DMZ_SIGNING=OFF
|
||||
-DMZ_LZMA=OFF
|
||||
-DMZ_ZSTD=OFF
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DBZIP2_LIBRARY=${LIBDIR}/bzip2/lib/${LIBPREFIX}bz2${LIBEXT}
|
||||
-DBZIP2_INCLUDE_DIR=${LIBDIR}/bzip2/include/
|
||||
# Because OCIO hardcodes a non standard include path
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=${LIBDIR}/minizipng/include/minizip-ng
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_minizipng
|
||||
URL file://${PACKAGE_DIR}/${MINIZIPNG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${MINIZIPNG_HASH_TYPE}=${MINIZIPNG_HASH}
|
||||
PREFIX ${BUILD_DIR}/minizipng
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/minizipng ${DEFAULT_CMAKE_FLAGS} ${MINIZIPNG_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/minizipng
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_minizipng
|
||||
external_zlib
|
||||
)
|
@@ -9,17 +9,13 @@ if(UNIX)
|
||||
# as does the OPENCOLLADA package, if this can be corrected upstream that would be better.
|
||||
# For now use `sed` to force UNIX line endings so the patch applies.
|
||||
# Needed as neither ignoring white-space or applying as a binary resolve this problem.
|
||||
if(APPLE)
|
||||
set(_dos2unix dos2unix)
|
||||
else()
|
||||
set(_dos2unix sed -i "s/\\r//")
|
||||
endif()
|
||||
set(PATCH_MAYBE_DOS2UNIX_CMD
|
||||
${_dos2unix}
|
||||
sed -i "s/\\r//"
|
||||
${PATCH_DIR}/opencollada.diff
|
||||
${BUILD_DIR}/opencollada/src/external_opencollada/CMakeLists.txt
|
||||
${BUILD_DIR}/opencollada/src/external_opencollada/Externals/LibXML/CMakeLists.txt &&
|
||||
)
|
||||
|
||||
else()
|
||||
set(OPENCOLLADA_EXTRA_ARGS
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
|
@@ -2,10 +2,10 @@
|
||||
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
-DOCIO_BUILD_APPS=OFF
|
||||
-DOCIO_BUILD_PYTHON=ON
|
||||
-DOCIO_BUILD_PYTHON=OFF
|
||||
-DOCIO_BUILD_NUKE=OFF
|
||||
-DOCIO_BUILD_JAVA=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DOCIO_BUILD_DOCS=OFF
|
||||
-DOCIO_BUILD_TESTS=OFF
|
||||
-DOCIO_BUILD_GPU_TESTS=OFF
|
||||
@@ -15,30 +15,10 @@ set(OPENCOLORIO_EXTRA_ARGS
|
||||
|
||||
-Dexpat_ROOT=${LIBDIR}/expat
|
||||
-Dyaml-cpp_ROOT=${LIBDIR}/yamlcpp
|
||||
-Dyaml-cpp_VERSION=${YAMLCPP_VERSION}
|
||||
-Dpystring_ROOT=${LIBDIR}/pystring
|
||||
-DImath_ROOT=${LIBDIR}/imath
|
||||
-Dminizip-ng_ROOT=${LIBDIR}/minizipng
|
||||
-Dminizip-ng_INCLUDE_DIR=${LIBDIR}/minizipng/include
|
||||
-Dminizip-ng_LIBRARY=${LIBDIR}/minizipng/lib/libminizip${LIBEXT}
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DPython_EXECUTABLE=${PYTHON_BINARY}
|
||||
-Dpybind11_ROOT=${LIBDIR}/pybind11
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=-liconv ${LIBDIR}/bzip2/lib/${LIBPREFIX}bz2${LIBEXT}"
|
||||
)
|
||||
elseif(UNIX)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=${LIBDIR}/bzip2/lib/${LIBPREFIX}bz2${LIBEXT}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
@@ -47,16 +27,11 @@ if(BLENDER_PLATFORM_ARM)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(OPENCOLORIO_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIMATH_DLL")
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(OPENCOLORIO_CXX_FLAGS "${OPENCOLORIO_CXX_FLAGS} -DPy_DEBUG")
|
||||
endif()
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
${OPENCOLORIO_EXTRA_ARGS}
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-Dexpat_LIBRARY=${LIBDIR}/expat/lib/libexpat$<$<STREQUAL:${BUILD_MODE},Debug>:d>MD${LIBEXT}
|
||||
-DImath_LIBRARY=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DCMAKE_CXX_FLAGS=${OPENCOLORIO_CXX_FLAGS}
|
||||
-Dexpat_LIBRARY=${LIBDIR}/expat/lib/libexpatMD
|
||||
-Dyaml-cpp_LIBRARY=${LIBDIR}/expat/lib/libyaml-cppmd.lib
|
||||
-DImath_LIBRARY=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}
|
||||
)
|
||||
else()
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
@@ -68,7 +43,6 @@ ExternalProject_Add(external_opencolorio
|
||||
URL file://${PACKAGE_DIR}/${OPENCOLORIO_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENCOLORIO_HASH_TYPE}=${OPENCOLORIO_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/opencolorio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
|
||||
@@ -81,26 +55,25 @@ add_dependencies(
|
||||
external_expat
|
||||
external_imath
|
||||
external_pystring
|
||||
external_zlib
|
||||
external_minizipng
|
||||
external_python
|
||||
external_pybind11
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_opencolorio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/bin/OpenColorIO_2_2.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_2_2.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib ${HARVEST_TARGET}/opencolorio/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatMD.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pystring/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_opencolorio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/bin/OpenColorIO_d_2_2.dll ${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_d_2_2.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/Opencolorio_d.lib ${HARVEST_TARGET}/opencolorio/lib/OpenColorIO_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/site-packages ${HARVEST_TARGET}/opencolorio/lib/site-packages-debug
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/expat/lib/libexpatdMD.lib ${HARVEST_TARGET}/opencolorio/lib/libexpatdMD.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pystring/lib/pystring.lib ${HARVEST_TARGET}/opencolorio/lib/pystring_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -16,7 +16,7 @@ set(OPENEXR_EXTRA_ARGS
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DBUILD_TESTING=OFF
|
||||
-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DOPENEXR_INSTALL_TOOLS=OFF
|
||||
-DOPENEXR_INSTALL_EXAMPLES=OFF
|
||||
-DImath_DIR=${LIBDIR}/imath/lib/cmake/Imath
|
||||
@@ -27,7 +27,6 @@ ExternalProject_Add(external_openexr
|
||||
URL file://${PACKAGE_DIR}/${OPENEXR_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENEXR_HASH_TYPE}=${OPENEXR_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/openexr
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openexr ${DEFAULT_CMAKE_FLAGS} ${OPENEXR_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openexr
|
||||
@@ -37,11 +36,6 @@ if(WIN32)
|
||||
ExternalProject_Add_Step(external_openexr after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/bin/Iex${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/openexr/bin/Iex${OPENEXR_VERSION_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/bin/IlmThread${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/openexr/bin/IlmThread${OPENEXR_VERSION_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/bin/OpenEXRCore${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/openexr/bin/OpenEXRCore${OPENEXR_VERSION_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/bin/OpenEXRUtil${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/openexr/bin/OpenEXRUtil${OPENEXR_VERSION_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openexr/bin/OpenEXR${OPENEXR_VERSION_POSTFIX}.dll ${HARVEST_TARGET}/openexr/bin/OpenEXR${OPENEXR_VERSION_POSTFIX}.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
@@ -49,5 +43,4 @@ endif()
|
||||
add_dependencies(
|
||||
external_openexr
|
||||
external_zlib
|
||||
external_imath
|
||||
)
|
||||
|
@@ -15,16 +15,14 @@ else()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PNG_LIBNAME libpng16_static${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
|
||||
set(OPENJPEG_POSTFIX _msvc)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(TIFF_POSTFIX d)
|
||||
set(PNG_POSTFIX d)
|
||||
else()
|
||||
set(TIFF_POSTFIX)
|
||||
set(PNG_POSTFIX)
|
||||
endif()
|
||||
set(PNG_LIBNAME libpng16_static${PNG_POSTFIX}${LIBEXT})
|
||||
else()
|
||||
set(PNG_LIBNAME libpng${LIBEXT})
|
||||
set(OIIO_SIMD_FLAGS)
|
||||
@@ -42,7 +40,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
${OPENIMAGEIO_LINKSTATIC}
|
||||
${DEFAULT_BOOST_FLAGS}
|
||||
-DUSE_LIBSQUISH=OFF
|
||||
@@ -56,7 +54,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DUSE_OPENGL=OFF
|
||||
-DUSE_TBB=OFF
|
||||
-DUSE_QT=OFF
|
||||
-DUSE_PYTHON=ON
|
||||
-DUSE_PYTHON=OFF
|
||||
-DUSE_GIF=OFF
|
||||
-DUSE_OPENCV=OFF
|
||||
-DUSE_OPENJPEG=ON
|
||||
@@ -78,14 +76,13 @@ set(OPENIMAGEIO_EXTRA_ARGS
|
||||
-DJPEG_LIBRARY=${LIBDIR}/jpeg/lib/${JPEG_LIBRARY}
|
||||
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpeg/include
|
||||
${OPENJPEG_FLAGS}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}
|
||||
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
-DUSE_EXTERNAL_PUGIXML=ON
|
||||
-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
|
||||
-DFMT_INCLUDE_DIR=${LIBDIR}/fmt/include/
|
||||
@@ -94,15 +91,12 @@ set(OPENIMAGEIO_EXTRA_ARGS
|
||||
${OIIO_SIMD_FLAGS}
|
||||
-DOpenEXR_ROOT=${LIBDIR}/openexr
|
||||
-DImath_ROOT=${LIBDIR}/imath
|
||||
-Dpybind11_ROOT=${LIBDIR}/pybind11
|
||||
-DPython_EXECUTABLE=${PYTHON_BINARY}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimageio
|
||||
URL file://${PACKAGE_DIR}/${OPENIMAGEIO_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENIMAGEIO_HASH_TYPE}=${OPENIMAGEIO_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/openimageio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
|
||||
@@ -123,8 +117,6 @@ add_dependencies(
|
||||
external_robinmap
|
||||
external_openjpeg${OPENJPEG_POSTFIX}
|
||||
external_webp
|
||||
external_python
|
||||
external_pybind11
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@@ -133,8 +125,7 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/OpenImageIO.dll ${HARVEST_TARGET}/OpenImageIO/bin/OpenImageIO.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/OpenImageIO_Util.dll ${HARVEST_TARGET}/OpenImageIO/bin/OpenImageIO_Util.dll
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
@@ -142,9 +133,6 @@ if(WIN32)
|
||||
ExternalProject_Add_Step(external_openimageio after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_d.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util_d.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/OpenImageIO_d.dll ${HARVEST_TARGET}/OpenImageIO/bin/OpenImageIO_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/OpenImageIO_Util_d.dll ${HARVEST_TARGET}/OpenImageIO/bin/OpenImageIO_Util_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib/python${PYTHON_SHORT_VERSION}/ ${HARVEST_TARGET}/OpenImageIO/lib/python${PYTHON_SHORT_VERSION}_debug/
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -39,10 +39,8 @@ if(MSVC)
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -32,7 +32,7 @@ else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTBB_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb${SHAREDLIBEXT}
|
||||
-DTBB_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -4,14 +4,23 @@ if(BUILD_MODE STREQUAL Debug)
|
||||
set(BLOSC_POST _d)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(OPENVDB_SHARED ON)
|
||||
set(OPENVDB_STATIC OFF)
|
||||
else()
|
||||
set(OPENVDB_SHARED OFF)
|
||||
set(OPENVDB_STATIC ON)
|
||||
endif()
|
||||
|
||||
set(OPENVDB_EXTRA_ARGS
|
||||
${DEFAULT_BOOST_FLAGS}
|
||||
-DUSE_STATIC_DEPENDENCIES=OFF # This is the global toggle for static libs
|
||||
# Once the above switch is off, you can set it
|
||||
# for each individual library below.
|
||||
-DBLOSC_USE_STATIC_LIBS=ON
|
||||
-DTBB_USE_STATIC_LIBS=OFF
|
||||
-DBoost_USE_STATIC_LIBS=OFF
|
||||
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_STATIC_RUNTIME=OFF
|
||||
-DBOOST_ROOT=${LIBDIR}/boost
|
||||
-DBoost_NO_SYSTEM_PATHS=ON
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
|
||||
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
|
||||
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
|
||||
@@ -19,36 +28,32 @@ set(OPENVDB_EXTRA_ARGS
|
||||
-DBlosc_LIBRARY_RELEASE=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
|
||||
-DBlosc_LIBRARY_DEBUG=${LIBDIR}/blosc/lib/libblosc${BLOSC_POST}${LIBEXT}
|
||||
-DOPENVDB_BUILD_UNITTESTS=OFF
|
||||
-DOPENVDB_BUILD_PYTHON_MODULE=OFF
|
||||
-DOPENVDB_BUILD_NANOVDB=ON
|
||||
-DNANOVDB_BUILD_TOOLS=OFF
|
||||
-DBlosc_ROOT=${LIBDIR}/blosc/
|
||||
-DTBB_ROOT=${LIBDIR}/tbb/
|
||||
-DTbb_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTbb_LEGACY_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DOPENVDB_CORE_SHARED=ON
|
||||
-DOPENVDB_CORE_STATIC=OFF
|
||||
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
|
||||
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
|
||||
-DOPENVDB_BUILD_BINARIES=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DBLOSC_USE_STATIC_LIBS=ON
|
||||
-DUSE_NANOVDB=ON
|
||||
-DOPENVDB_BUILD_PYTHON_MODULE=ON
|
||||
-DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON
|
||||
-DUSE_NUMPY=ON
|
||||
-DPython_EXECUTABLE=${PYTHON_BINARY}
|
||||
|
||||
# OPENVDB_AX Disabled for now as it adds ~25MB distribution wise
|
||||
# with no blender code depending on it, seems wasteful.
|
||||
# -DOPENVDB_BUILD_AX=ON
|
||||
# -DOPENVDB_AX_SHARED=ON
|
||||
# -DOPENVDB_AX_STATIC=OFF
|
||||
# -DLLVM_DIR=${LIBDIR}/llvm/lib/cmake/llvm
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# Namespaces seem to be buggy and cause linker errors due to things not
|
||||
# being in the correct namespace
|
||||
# needs to link pthreads due to it being a blosc dependency
|
||||
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES="${LIBDIR}/pthreads/lib/pthreadVC3.lib"
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(openvdb
|
||||
URL file://${PACKAGE_DIR}/${OPENVDB_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENVDB_HASH_TYPE}=${OPENVDB_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/openvdb
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openvdb/src/openvdb < ${PATCH_DIR}/openvdb.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openvdb ${DEFAULT_CMAKE_FLAGS} ${OPENVDB_EXTRA_ARGS}
|
||||
@@ -61,8 +66,6 @@ add_dependencies(
|
||||
external_boost
|
||||
external_zlib
|
||||
external_blosc
|
||||
external_python
|
||||
external_numpy
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@@ -71,7 +74,6 @@ if(WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb.pyd ${HARVEST_TARGET}openvdb/python/pyopenvdb.pyd
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
@@ -79,7 +81,6 @@ if(WIN32)
|
||||
ExternalProject_Add_Step(openvdb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb_d.pyd ${HARVEST_TARGET}openvdb/python/pyopenvdb_d.pyd
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -4,7 +4,7 @@ if(WIN32)
|
||||
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
|
||||
endif()
|
||||
option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure phase" OFF)
|
||||
|
||||
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
|
||||
cmake_host_system_information(RESULT NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
set(MAKE_THREADS ${NUM_CORES} CACHE STRING "Number of threads to run make with")
|
||||
|
||||
@@ -41,36 +41,31 @@ if(WIN32)
|
||||
set(LIBEXT ".lib")
|
||||
set(SHAREDLIBEXT ".lib")
|
||||
set(LIBPREFIX "")
|
||||
set(MESON ${LIBDIR}/python/Scripts/meson)
|
||||
|
||||
# For OIIO and OSL
|
||||
set(COMMON_DEFINES /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
||||
set(COMMON_DEFINES /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS)
|
||||
|
||||
if(MSVC_VERSION GREATER 1909)
|
||||
set(COMMON_MSVC_FLAGS "/Wv:18") #some deps with warnings as error aren't quite ready for dealing with the new 2017 warnings.
|
||||
endif()
|
||||
string(APPEND COMMON_MSVC_FLAGS " /bigobj")
|
||||
# To keep MSVC from oversubscribing the CPU, force it to single threaded mode
|
||||
# msbuild/ninja will queue as many compile units as there are cores, no need for
|
||||
# msvc to be internally threading as well.
|
||||
string(APPEND COMMON_MSVC_FLAGS " /cgthreads1 ")
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D_DEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
else()
|
||||
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
if(WITH_OPTIMIZED_DEBUG)
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O2 /Ob2 /D_DEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS /DBOOST_DEBUG_PYTHON /DBOOST_ALL_NO_LIB")
|
||||
else()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS /DBOOST_DEBUG_PYTHON /DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
|
||||
|
||||
set(PLATFORM_FLAGS)
|
||||
set(PLATFORM_CXX_FLAGS)
|
||||
@@ -81,18 +76,6 @@ if(WIN32)
|
||||
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
|
||||
set(MINGW_HOST x86_64-w64-mingw32)
|
||||
|
||||
# some build systems like meson will respect the *nix like environment vars
|
||||
# like CFLAGS and LDFlags but will still build with the MSVC compiler, so for
|
||||
# those we need to empty out the gcc style flags that are normally in there.
|
||||
set(CONFIGURE_ENV_MSVC
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${PERL_SHELL} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS= &&
|
||||
set LDFLAGS=
|
||||
)
|
||||
|
||||
set(CONFIGURE_ENV
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${PERL_SHELL} &&
|
||||
@@ -115,11 +98,10 @@ if(WIN32)
|
||||
else()
|
||||
set(PATCH_CMD patch)
|
||||
set(LIBEXT ".a")
|
||||
set(SHAREDLIBEXT ".so")
|
||||
set(LIBPREFIX "lib")
|
||||
set(MESON ${LIBDIR}/python/bin/meson)
|
||||
if(APPLE)
|
||||
set(SHAREDLIBEXT ".dylib")
|
||||
|
||||
if(APPLE)
|
||||
# Use same Xcode detection as Blender itself.
|
||||
include(../cmake/platform/platform_apple_xcode.cmake)
|
||||
|
||||
@@ -128,7 +110,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -std=c++17 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
|
||||
@@ -141,14 +123,12 @@ else()
|
||||
-DCMAKE_OSX_SYSROOT:PATH=${CMAKE_OSX_SYSROOT}
|
||||
)
|
||||
else()
|
||||
set(SHAREDLIBEXT ".so")
|
||||
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
||||
set(BLENDER_PLATFORM_ARM ON)
|
||||
endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-fPIC")
|
||||
set(PLATFORM_CXXFLAGS "-std=c++17 -fPIC")
|
||||
set(PLATFORM_CXXFLAGS "-std=c++11 -fPIC")
|
||||
set(PLATFORM_LDFLAGS)
|
||||
set(PLATFORM_BUILD_TARGET)
|
||||
set(PLATFORM_CMAKE_FLAGS -DCMAKE_INSTALL_LIBDIR=lib)
|
||||
@@ -195,7 +175,6 @@ set(DEFAULT_CMAKE_FLAGS
|
||||
-DCMAKE_CXX_FLAGS_MINSIZEREL=${BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${BLENDER_CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
|
||||
-DCMAKE_CXX_STANDARD=17
|
||||
${PLATFORM_CMAKE_FLAGS}
|
||||
)
|
||||
|
||||
@@ -214,11 +193,3 @@ if(MSVC)
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_MESSAGE LAZY)
|
||||
|
||||
# On windows we sometimes want to build with ninja, but not all projects quite
|
||||
# yet, so for select project we pass PLATFORM_ALT_GENERATOR as the generator
|
||||
if(WIN32)
|
||||
set(PLATFORM_ALT_GENERATOR "Ninja")
|
||||
else()
|
||||
set(PLATFORM_ALT_GENERATOR "Unix Makefiles")
|
||||
endif()
|
||||
|
@@ -9,7 +9,6 @@ ExternalProject_Add(external_opus
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--disable-maintainer-mode
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/opus
|
||||
|
@@ -6,7 +6,7 @@ if(WIN32)
|
||||
else()
|
||||
set(OSL_CMAKE_CXX_STANDARD_LIBRARIES)
|
||||
set(OSL_FLEX_BISON)
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/OpenImageIO${SHAREDLIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpeg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}")
|
||||
set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpeg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
|
||||
endif()
|
||||
|
||||
set(OSL_EXTRA_ARGS
|
||||
@@ -21,7 +21,7 @@ set(OSL_EXTRA_ARGS
|
||||
${OSL_FLEX_BISON}
|
||||
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DLINKSTATIC=OFF
|
||||
-DLINKSTATIC=ON
|
||||
-DOSL_BUILD_PLUGINS=OFF
|
||||
-DSTOP_ON_WARNING=OFF
|
||||
-DUSE_LLVM_BITCODE=OFF
|
||||
@@ -35,14 +35,13 @@ set(OSL_EXTRA_ARGS
|
||||
-DTIFF_ROOT=${LIBDIR}/tiff
|
||||
-DJPEG_ROOT=${LIBDIR}/jpeg
|
||||
-DUSE_PYTHON=OFF
|
||||
-DCMAKE_CXX_STANDARD=14
|
||||
-DImath_ROOT=${LIBDIR}/imath
|
||||
-DUSE_OIIO_STATIC=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_osl
|
||||
URL file://${PACKAGE_DIR}/${OSL_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
LIST_SEPARATOR ^^
|
||||
URL_HASH ${OSL_HASH_TYPE}=${OSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/osl
|
||||
|
@@ -34,4 +34,5 @@ if(WIN32)
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
@@ -1,21 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PYBIND11_EXTRA_ARGS
|
||||
-DPYBIND11_TEST=OFF
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_pybind11
|
||||
URL file://${PACKAGE_DIR}/${PYBIND11_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${PYBIND11_HASH_TYPE}=${PYBIND11_HASH}
|
||||
PREFIX ${BUILD_DIR}/pybind11
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pybind11 ${DEFAULT_CMAKE_FLAGS} ${PYBIND11_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/pybind11
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_pybind11
|
||||
external_python
|
||||
)
|
@@ -16,12 +16,10 @@ if(WIN32)
|
||||
|
||||
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
|
||||
set(ZLIB_SOURCE_FOLDER ${BUILD_DIR}/zlib/src/external_zlib)
|
||||
set(SSL_SOURCE_FOLDER ${BUILD_DIR}/ssl/src/external_ssl)
|
||||
set(DOWNLOADS_EXTERNALS_FOLDER ${DOWNLOAD_DIR}/externals)
|
||||
|
||||
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
|
||||
cmake_to_dos_path(${ZLIB_SOURCE_FOLDER} ZLIB_SOURCE_FOLDER_DOS)
|
||||
cmake_to_dos_path(${SSL_SOURCE_FOLDER} SSL_SOURCE_FOLDER_DOS)
|
||||
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
@@ -32,14 +30,12 @@ if(WIN32)
|
||||
# Python will download its own deps and there's very little we can do about
|
||||
# that beyond placing some code in their externals dir before it tries.
|
||||
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
|
||||
# regardless of the version actually in there.
|
||||
PATCH_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.13 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-1.1.1q ${SSL_SOURCE_FOLDER_DOS} &&
|
||||
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.13/zconf.h &&
|
||||
${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_windows.diff
|
||||
CONFIGURE_COMMAND echo "."
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_MSVC} && cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && set LDFLAGS=/DEBUG && call prepare_ssl.bat && call build.bat -e -p x64 -c ${BUILD_MODE}
|
||||
# python 3.10.8 still ships zlib 1.2.12, replace it with our 1.2.13
|
||||
# copy until they update.
|
||||
CONFIGURE_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
|
||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.12 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
||||
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.12/zconf.h
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -c ${BUILD_MODE}
|
||||
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-stable --include-pip --include-dev --include-launchers --include-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
|
||||
)
|
||||
add_dependencies(
|
||||
@@ -73,10 +69,11 @@ else()
|
||||
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
|
||||
endif()
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
|
||||
else()
|
||||
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
|
||||
endif()
|
||||
set(PYTHON_BINARY ${LIBDIR}/python/bin/python${PYTHON_SHORT_VERSION})
|
||||
# Link against zlib statically (Unix). Avoid rpath issues (macOS).
|
||||
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_unix.diff)
|
||||
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
|
||||
@@ -100,31 +97,14 @@ else()
|
||||
INSTALL_DIR ${LIBDIR}/python)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_python
|
||||
external_ssl
|
||||
external_zlib
|
||||
)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_python
|
||||
external_bzip2
|
||||
external_ffi
|
||||
external_lzma
|
||||
external_ssl
|
||||
external_sqlite
|
||||
external_zlib
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_python after_install
|
||||
# Boost can't keep it self from linking release python
|
||||
# in a debug configuration even if all options are set
|
||||
# correctly to instruct it to use the debug version
|
||||
# of python. So just copy the debug imports file over
|
||||
# and call it a day...
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -5,11 +5,7 @@ if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
# zstandard is determined to build and link release mode libs in a debug
|
||||
# configuration, the only way to make it happy is to bend to its will
|
||||
# and give it a library to link with.
|
||||
set(
|
||||
PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib
|
||||
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||
)
|
||||
set(PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib)
|
||||
else()
|
||||
set(PIP_CONFIGURE_COMMAND echo ".")
|
||||
endif()
|
||||
@@ -19,23 +15,7 @@ ExternalProject_Add(external_python_site_packages
|
||||
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
|
||||
# setuptools is downgraded to 63.2.0 (same as python 3.10.8) since numpy 1.23.x seemingly has
|
||||
# issues building on windows with the newer versions that ships with python 3.10.9+
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA}
|
||||
setuptools==63.2.0
|
||||
cython==${CYTHON_VERSION}
|
||||
idna==${IDNA_VERSION}
|
||||
charset-normalizer==${CHARSET_NORMALIZER_VERSION}
|
||||
urllib3==${URLLIB3_VERSION}
|
||||
certifi==${CERTIFI_VERSION}
|
||||
requests==${REQUESTS_VERSION}
|
||||
zstandard==${ZSTANDARD_VERSION}
|
||||
autopep8==${AUTOPEP8_VERSION}
|
||||
pycodestyle==${PYCODESTYLE_VERSION}
|
||||
toml==${TOML_VERSION}
|
||||
meson==${MESON_VERSION}
|
||||
--no-binary :all:
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} --no-binary :all:
|
||||
)
|
||||
|
||||
if(USE_PIP_NUMPY)
|
||||
|
@@ -1,47 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SHADERC_EXTRA_ARGS
|
||||
-DSHADERC_SKIP_TESTS=On
|
||||
-DSHADERC_SPIRV_TOOLS_DIR=${BUILD_DIR}/shaderc_spirv_tools/src/external_shaderc_spirv_tools
|
||||
-DSHADERC_SPIRV_HEADERS_DIR=${BUILD_DIR}/shaderc_spirv_headers/src/external_shaderc_spirv_headers
|
||||
-DSHADERC_GLSLANG_DIR=${BUILD_DIR}/shaderc_glslang/src/external_shaderc_glslang
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_shaderc
|
||||
URL file://${PACKAGE_DIR}/${SHADERC_FILE}
|
||||
URL_HASH ${SHADERC_HASH_TYPE}=${SHADERC_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/shaderc
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/shaderc ${DEFAULT_CMAKE_FLAGS} ${SHADERC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/shaderc
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_shaderc
|
||||
external_shaderc_spirv_tools
|
||||
external_shaderc_spirv_headers
|
||||
external_shaderc_glslang
|
||||
external_python
|
||||
)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_shaderc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/shaderc/include ${HARVEST_TARGET}/shaderc/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/shaderc/bin/shaderc_shared.dll ${HARVEST_TARGET}/shaderc/bin/shaderc_shared.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/shaderc/lib/shaderc_shared.lib ${HARVEST_TARGET}/shaderc/lib/shaderc_shared.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_shaderc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/shaderc/bin/shaderc_shared_d.dll ${HARVEST_TARGET}/shaderc/bin/shaderc_shared_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/shaderc/lib/shaderc_shared_d.lib ${HARVEST_TARGET}/shaderc/lib/shaderc_shared_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,34 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# These are build time requirements for shaderc. We only have to unpack these
|
||||
# shaderc will build them.
|
||||
|
||||
ExternalProject_Add(external_shaderc_glslang
|
||||
URL file://${PACKAGE_DIR}/${SHADERC_GLSLANG_FILE}
|
||||
URL_HASH ${SHADERC_GLSLANG_HASH_TYPE}=${SHADERC_GLSLANG_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/shaderc_glslang
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_shaderc_spirv_headers
|
||||
URL file://${PACKAGE_DIR}/${SHADERC_SPIRV_HEADERS_FILE}
|
||||
URL_HASH ${SHADERC_SPIRV_HEADERS_HASH_TYPE}=${SHADERC_SPIRV_HEADERS_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/shaderc_spirv_headers
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_shaderc_spirv_tools
|
||||
URL file://${PACKAGE_DIR}/${SHADERC_SPIRV_TOOLS_FILE}
|
||||
URL_HASH ${SHADERC_SPIRV_TOOLS_HASH_TYPE}=${SHADERC_SPIRV_TOOLS_HASH}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
PREFIX ${BUILD_DIR}/shaderc_spirv_tools
|
||||
CONFIGURE_COMMAND echo .
|
||||
BUILD_COMMAND echo .
|
||||
INSTALL_COMMAND echo .
|
||||
)
|
@@ -1,15 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SNDFILE_EXTRA_ARGS)
|
||||
set(SNDFILE_ENV)
|
||||
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR})
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV "PKG_CONFIG_PATH=\
|
||||
${mingw_LIBDIR}/ogg/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/flac/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/opus/lib/pkgconfig"
|
||||
)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||
@@ -36,7 +30,6 @@ add_dependencies(
|
||||
external_sndfile
|
||||
external_ogg
|
||||
external_vorbis
|
||||
external_opus
|
||||
)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
|
@@ -5,20 +5,7 @@ ExternalProject_Add(external_spnav
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
|
||||
PREFIX ${BUILD_DIR}/spnav
|
||||
|
||||
CONFIGURE_COMMAND
|
||||
${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/spnav/src/external_spnav/ &&
|
||||
${CONFIGURE_COMMAND}
|
||||
--prefix=${LIBDIR}/spnav
|
||||
# X11 is not needed as Blender polls the device as part of the GHOST event loop.
|
||||
# This is used to support `3dxserv`, however this is no longer supported by 3DCONNEXION.
|
||||
# Disable so building without X11 is supported (WAYLAND only).
|
||||
--disable-x11
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/spnav
|
||||
|
@@ -3,23 +3,10 @@
|
||||
set(SSL_CONFIGURE_COMMAND ./Configure)
|
||||
set(SSL_PATCH_CMD echo .)
|
||||
|
||||
if(WIN32)
|
||||
# Python will build this with its preferred build options and patches. We only need to unpack openssl
|
||||
ExternalProject_Add(external_ssl
|
||||
URL file://${PACKAGE_DIR}/${SSL_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SSL_HASH_TYPE}=${SSL_HASH}
|
||||
PREFIX ${BUILD_DIR}/ssl
|
||||
CONFIGURE_COMMAND echo "."
|
||||
BUILD_COMMAND echo "."
|
||||
INSTALL_COMMAND echo "."
|
||||
INSTALL_DIR ${LIBDIR}/ssl
|
||||
)
|
||||
else()
|
||||
if(APPLE)
|
||||
if(APPLE)
|
||||
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
|
||||
set(SSL_PATCH_CMD ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/ssl/src/external_ssl < ${PATCH_DIR}/ssl.diff)
|
||||
else()
|
||||
else()
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(SSL_OS_COMPILER "blender-linux-aarch64")
|
||||
elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
@@ -28,9 +15,9 @@ else()
|
||||
else()
|
||||
set(SSL_OS_COMPILER "blender-linux-x86")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_ssl
|
||||
ExternalProject_Add(external_ssl
|
||||
URL file://${PACKAGE_DIR}/${SSL_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SSL_HASH_TYPE}=${SSL_HASH}
|
||||
@@ -45,5 +32,4 @@ else()
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ssl
|
||||
)
|
||||
endif()
|
||||
)
|
||||
|
@@ -1,14 +1,26 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
set(TBB_EXTRA_ARGS
|
||||
if(WIN32)
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=On
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=On
|
||||
-DTBB_BUILD_STATIC=Off
|
||||
-DTBB_BUILD_TESTS=Off
|
||||
-DCMAKE_DEBUG_POSTFIX=_debug
|
||||
)
|
||||
set(TBB_LIBRARY tbb)
|
||||
set(TBB_STATIC_LIBRARY Off)
|
||||
)
|
||||
set(TBB_LIBRARY tbb)
|
||||
set(TBB_STATIC_LIBRARY Off)
|
||||
else()
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=Off
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||
-DTBB_BUILD_STATIC=On
|
||||
-DTBB_BUILD_TESTS=Off
|
||||
)
|
||||
set(TBB_LIBRARY tbb_static)
|
||||
set(TBB_STATIC_LIBRARY On)
|
||||
endif()
|
||||
|
||||
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
|
||||
ExternalProject_Add(external_tbb
|
||||
|
@@ -7,57 +7,32 @@ if(WIN32)
|
||||
# USD does not look for debug libs, nor does it link them
|
||||
# when building static, so this is just to keep find_package happy
|
||||
# if we ever link dynamically on windows util will need to be linked as well.
|
||||
set(USD_OIIO_CMAKE_DEFINES "-DOIIO_LIBRARIES=${LIBDIR}/openimageio/lib/OpenImageIO_d${LIBEXT}^^${LIBDIR}/openimageio/lib/OpenImageIO_util_d${LIBEXT}")
|
||||
set(USD_OIIO_CMAKE_DEFINES "-DOIIO_LIBRARIES=${LIBDIR}/openimageio/lib/OpenImageIO_d${LIBEXT}")
|
||||
endif()
|
||||
set(USD_PLATFORM_FLAGS
|
||||
${USD_OIIO_CMAKE_DEFINES}
|
||||
-DCMAKE_CXX_FLAGS=${USD_CXX_FLAGS}
|
||||
-D_PXR_CXX_DEFINITIONS=/DBOOST_ALL_NO_LIB
|
||||
-DCMAKE_SHARED_LINKER_FLAGS_INIT=/LIBPATH:${LIBDIR}/tbb/lib
|
||||
-DPython_FIND_REGISTRY=NEVER
|
||||
-DPYTHON_INCLUDE_DIRS=${LIBDIR}/python/include
|
||||
-DPYTHON_LIBRARY=${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}${LIBEXT}
|
||||
)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
list(APPEND USD_PLATFORM_FLAGS -DPXR_USE_DEBUG_PYTHON=ON)
|
||||
list(APPEND USD_PLATFORM_FLAGS -DOPENVDB_LIBRARY=${LIBDIR}/openvdb/lib/openvdb_d.lib)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
# Workaround USD not linking correctly with static Python library, where it would embed
|
||||
# part of the interpret in the USD library. Allow undefined Python symbols and replace
|
||||
# Python library with TBB so it doesn't complain about missing library.
|
||||
set(USD_PLATFORM_FLAGS
|
||||
-DPYTHON_INCLUDE_DIR=${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/
|
||||
-DPYTHON_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
set(USD_SHARED_LINKER_FLAGS "-Xlinker -undefined -Xlinker dynamic_lookup")
|
||||
list(APPEND USD_PLATFORM_FLAGS
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(USD_EXTRA_ARGS
|
||||
${DEFAULT_BOOST_FLAGS}
|
||||
${USD_PLATFORM_FLAGS}
|
||||
# This is a preventative measure that avoids possible conflicts when add-ons
|
||||
# try to load another USD library into the same process space.
|
||||
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
|
||||
-DOPENSUBDIV_ROOT_DIR=${LIBDIR}/opensubdiv
|
||||
-DOpenImageIO_ROOT=${LIBDIR}/openimageio
|
||||
-DOPENEXR_LIBRARIES=${LIBDIR}/imath/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}
|
||||
-DOPENEXR_LIBRARIES=${LIBDIR}/imath/lib/imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
|
||||
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/imath/include
|
||||
-DImath_DIR=${LIBDIR}/imath
|
||||
-DOPENVDB_LOCATION=${LIBDIR}/openvdb
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=ON
|
||||
-DPXR_USE_PYTHON_3=ON
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
|
||||
-DPXR_BUILD_IMAGING=ON
|
||||
-DPXR_BUILD_TESTS=OFF
|
||||
-DPXR_BUILD_EXAMPLES=OFF
|
||||
-DPXR_BUILD_TUTORIALS=OFF
|
||||
-DPXR_BUILD_USDVIEW=OFF
|
||||
-DPXR_ENABLE_HDF5_SUPPORT=OFF
|
||||
-DPXR_ENABLE_MATERIALX_SUPPORT=OFF
|
||||
-DPXR_ENABLE_OPENVDB_SUPPORT=ON
|
||||
-DPXR_ENABLE_OPENVDB_SUPPORT=OFF
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DPXR_BUILD_MONOLITHIC=ON
|
||||
# OSL is an optional dependency of the Imaging module. However, since that
|
||||
@@ -65,36 +40,41 @@ set(USD_EXTRA_ARGS
|
||||
# cube, etc.) to geometry, it's not necessary. Disabling it will make it
|
||||
# simpler to build Blender; currently only Cycles uses OSL.
|
||||
-DPXR_ENABLE_OSL_SUPPORT=OFF
|
||||
# Enable OpenGL for Hydra support. Note that this indirectly also adds an X11
|
||||
# dependency on Linux. This would be good to eliminate for headless and Wayland
|
||||
# only builds, however is not worse than what Blender already links to for
|
||||
# official releases currently.
|
||||
-DPXR_ENABLE_GL_SUPPORT=ON
|
||||
# OIIO is used for loading image textures in Hydra Storm / Embree renderers.
|
||||
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON
|
||||
# GL support on Linux also links to X11 libraries. Enabling it would break
|
||||
# headless or Wayland-only builds. OpenGL support would be useful if someone
|
||||
# wants to work on a Hydra viewport in Blender; when that's actually being
|
||||
# worked on, we could patch in a new PXR_ENABLE_X11_SUPPORT option (to
|
||||
# separate OpenGL from X11) and contribute it upstream.
|
||||
-DPXR_ENABLE_GL_SUPPORT=OFF
|
||||
# Disable Metal since USD fails to build this when OpenGL is disabled.
|
||||
-DPXR_ENABLE_METAL_SUPPORT=OFF
|
||||
# OIIO is used for loading image textures in Hydra Storm / Embree renderers,
|
||||
# which we don't use.
|
||||
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=OFF
|
||||
# USD 22.03 does not support OCIO 2.x
|
||||
# Tracking ticket https://github.com/PixarAnimationStudios/USD/issues/1386
|
||||
-DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF
|
||||
-DPXR_ENABLE_PTEX_SUPPORT=OFF
|
||||
-DPXR_BUILD_USD_TOOLS=OFF
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DBUILD_SHARED_LIBS=Off
|
||||
# USD is hellbound on making a shared library,
|
||||
# unless you point this variable to a valid CMAKE file doesn't have to make sense,
|
||||
# but as long as it points somewhere valid it will skip the shared library.
|
||||
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
|
||||
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
|
||||
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
|
||||
-DTBB_tbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
|
||||
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
# USD wants the tbb debug lib set even when you are doing a release build
|
||||
# Otherwise it will error out during the cmake configure phase.
|
||||
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
|
||||
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_usd
|
||||
URL file://${PACKAGE_DIR}/${USD_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${USD_HASH_TYPE}=${USD_HASH}
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
PREFIX ${BUILD_DIR}/usd
|
||||
LIST_SEPARATOR ^^
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/usd
|
||||
@@ -105,15 +85,13 @@ add_dependencies(
|
||||
external_tbb
|
||||
external_boost
|
||||
external_opensubdiv
|
||||
external_python
|
||||
external_openimageio
|
||||
openvdb
|
||||
)
|
||||
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e.
|
||||
# "libusd_m.a" became "libusd_usd_m.a".
|
||||
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
|
||||
if(NOT WIN32)
|
||||
if(USD_VERSION VERSION_LESS 21.11)
|
||||
if (USD_VERSION VERSION_LESS 21.11)
|
||||
set(PXR_LIB_PREFIX "")
|
||||
else()
|
||||
set(PXR_LIB_PREFIX "usd_")
|
||||
@@ -123,16 +101,27 @@ endif()
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd ${HARVEST_TARGET}/usd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/usd_usd_m.lib ${HARVEST_TARGET}/usd/lib/usd_usd_m.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib/python ${HARVEST_TARGET}/usd/lib/debug/python
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/usd/lib/usd_ms_d.dll ${HARVEST_TARGET}/usd/lib/usd_ms_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/usd/lib/usd_ms_d.lib ${HARVEST_TARGET}/usd/lib/usd_ms_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/usd_usd_m_d.lib ${HARVEST_TARGET}/usd/lib/usd_usd_m_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# USD has two build options. The default build creates lots of small libraries,
|
||||
# whereas the 'monolithic' build produces only a single library. The latter
|
||||
# makes linking simpler, so that's what we use in Blender. However, running
|
||||
# 'make install' in the USD sources doesn't install the static library in that
|
||||
# case (only the shared library). As a result, we need to grab the `libusd_m.a`
|
||||
# file from the build directory instead of from the install directory.
|
||||
ExternalProject_Add_Step(external_usd after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/lib${PXR_LIB_PREFIX}usd_m.a ${HARVEST_TARGET}/usd/lib/lib${PXR_LIB_PREFIX}usd_m.a
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -35,12 +35,12 @@ set(JPEG_HASH_TYPE MD5)
|
||||
set(JPEG_FILE libjpeg-turbo-${JPEG_VERSION}.tar.gz)
|
||||
set(JPEG_CPE "cpe:2.3:a:d.r.commander:libjpeg-turbo:${JPEG_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(BOOST_VERSION 1.80.0)
|
||||
set(BOOST_VERSION_SHORT 1.80)
|
||||
set(BOOST_VERSION_NODOTS 1_80_0)
|
||||
set(BOOST_VERSION_NODOTS_SHORT 1_80)
|
||||
set(BOOST_VERSION 1.78.0)
|
||||
set(BOOST_VERSION_SHORT 1.78)
|
||||
set(BOOST_VERSION_NODOTS 1_78_0)
|
||||
set(BOOST_VERSION_NODOTS_SHORT 1_78)
|
||||
set(BOOST_URI https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
|
||||
set(BOOST_HASH 077f074743ea7b0cb49c6ed43953ae95)
|
||||
set(BOOST_HASH c2f6428ac52b0e5a3c9b2e1d8cc832b5)
|
||||
set(BOOST_HASH_TYPE MD5)
|
||||
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
|
||||
set(BOOST_CPE "cpe:2.3:a:boost:boost:${BOOST_VERSION}:*:*:*:*:*:*:*")
|
||||
@@ -77,11 +77,11 @@ if(WIN32)
|
||||
# we need to tell the build the postfix is _s while
|
||||
# telling all other deps the postfix is _s_d
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(OPENEXR_VERSION_POSTFIX )
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX )
|
||||
set(OPENEXR_VERSION_POSTFIX _s)
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
|
||||
else()
|
||||
set(OPENEXR_VERSION_POSTFIX _d)
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX )
|
||||
set(OPENEXR_VERSION_POSTFIX _s_d)
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
|
||||
endif()
|
||||
else()
|
||||
set(OPENEXR_VERSION_BUILD_POSTFIX)
|
||||
@@ -114,9 +114,9 @@ set(ALEMBIC_HASH_TYPE MD5)
|
||||
set(ALEMBIC_FILE alembic-${ALEMBIC_VERSION}.tar.gz)
|
||||
SET(FREETYPE_CPE "cpe:2.3:a:freetype:freetype:${FREETYPE_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(OPENSUBDIV_VERSION v3_5_0)
|
||||
set(OPENSUBDIV_VERSION v3_4_4)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
|
||||
set(OPENSUBDIV_HASH 230f5cd2911d6240e58a3773b9c6e5e4)
|
||||
set(OPENSUBDIV_HASH 39ecc5caf0abebc943d1ce131855e76e)
|
||||
set(OPENSUBDIV_HASH_TYPE MD5)
|
||||
set(OPENSUBDIV_FILE opensubdiv-${OPENSUBDIV_VERSION}.tar.gz)
|
||||
|
||||
@@ -133,18 +133,12 @@ set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
|
||||
set(OPENCOLLADA_HASH_TYPE MD5)
|
||||
set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
|
||||
|
||||
set(OPENCOLORIO_VERSION 2.2.0)
|
||||
set(OPENCOLORIO_VERSION 2.1.1)
|
||||
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
|
||||
set(OPENCOLORIO_HASH d58a5980adba2d89a363100a09daa5f3)
|
||||
set(OPENCOLORIO_HASH 604f562e073f23d88ce89ed4f7f709ba)
|
||||
set(OPENCOLORIO_HASH_TYPE MD5)
|
||||
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
|
||||
|
||||
set(MINIZIPNG_VERSION 3.0.7)
|
||||
set(MINIZIPNG_URI https://github.com/zlib-ng/minizip-ng/archive/${MINIZIPNG_VERSION}.tar.gz)
|
||||
set(MINIZIPNG_HASH 09dcc8a9def348e1be9659e384c2cd55)
|
||||
set(MINIZIPNG_HASH_TYPE MD5)
|
||||
set(MINIZIPNG_FILE minizip-ng-${MINIZIPNG_VERSION}.tar.gz)
|
||||
|
||||
set(LLVM_VERSION 12.0.0)
|
||||
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz)
|
||||
set(LLVM_HASH 5a4fab4d7fc84aefffb118ac2c8a4fc0)
|
||||
@@ -165,9 +159,9 @@ set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${
|
||||
set(OPENMP_HASH_TYPE MD5)
|
||||
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
|
||||
|
||||
set(OPENIMAGEIO_VERSION v2.4.6.0)
|
||||
set(OPENIMAGEIO_VERSION v2.3.20.0)
|
||||
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/refs/tags/${OPENIMAGEIO_VERSION}.tar.gz)
|
||||
set(OPENIMAGEIO_HASH c7acc1b9a8fda04ef48f7de1feda4dae)
|
||||
set(OPENIMAGEIO_HASH defb1fe7c8e64bac60eb3cacaf5c3736)
|
||||
set(OPENIMAGEIO_HASH_TYPE MD5)
|
||||
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
|
||||
|
||||
@@ -195,25 +189,17 @@ set(TIFF_HASH_TYPE MD5)
|
||||
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
||||
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
# Recent commit from 1.13.0.2 under development, which includes string table
|
||||
# changes that make the Cycles OptiX implementation work. Official 1.12 OSL
|
||||
# releases should also build but without OptiX support.
|
||||
set(OSL_VERSION 1a7670600c8b08c2443a78d03c8c27e9a1149140)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 7b6d6716b05d1addb92a8f47280bf77f)
|
||||
set(OSL_VERSION 1.12.6.2)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 6fef11548adfdd3e5b25c49d2dae96ee)
|
||||
set(OSL_HASH_TYPE MD5)
|
||||
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
||||
|
||||
# NOTE: When updating the python version, it's required to check the versions of
|
||||
# it wants to use in PCbuild/get_externals.bat for the following dependencies:
|
||||
# BZIP2, FFI, SQLITE and change the versions in this file as well. For compliance
|
||||
# reasons there can be no exceptions to this.
|
||||
|
||||
set(PYTHON_VERSION 3.10.9)
|
||||
set(PYTHON_VERSION 3.10.8)
|
||||
set(PYTHON_SHORT_VERSION 3.10)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH dc8c0f274b28ee9e95923d20cfc364c9)
|
||||
set(PYTHON_HASH e92356b012ed4d0e09675131d39b1bde)
|
||||
set(PYTHON_HASH_TYPE MD5)
|
||||
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_CPE "cpe:2.3:a:python:python:${PYTHON_VERSION}:-:*:*:*:*:*:*")
|
||||
@@ -226,48 +212,33 @@ set(TBB_HASH_TYPE MD5)
|
||||
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
|
||||
set(TBB_CPE "cpe:2.3:a:intel:threading_building_blocks:${TBB_YEAR}:*:*:*:*:*:*:*")
|
||||
|
||||
set(OPENVDB_VERSION 10.0.0)
|
||||
set(OPENVDB_VERSION 9.0.0)
|
||||
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
set(OPENVDB_HASH 64301c737e16b26c8f3085a31e6397e9)
|
||||
set(OPENVDB_HASH 684ce40c2f74f3a0c9cac530e1c7b07e)
|
||||
set(OPENVDB_HASH_TYPE MD5)
|
||||
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Python Modules
|
||||
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(IDNA_VERSION 3.3)
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(CHARSET_NORMALIZER_VERSION 2.0.10)
|
||||
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||
set(URLLIB3_VERSION 1.26.8)
|
||||
set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
|
||||
# Needed by: Python's `requests` module (so add-ons can authenticate against trusted certificates).
|
||||
set(CERTIFI_VERSION 2021.10.8)
|
||||
# Needed by: Some of Blender's add-ons (to support convenient interaction with online services).
|
||||
set(REQUESTS_VERSION 2.27.1)
|
||||
# Needed by: Python's `numpy` module (used by some add-ons).
|
||||
set(CYTHON_VERSION 0.29.30)
|
||||
# Needed by: Python scripts that read `.blend` files, as files may use Z-standard compression.
|
||||
# The version of the ZSTD library used to build the Python package should match ZSTD_VERSION
|
||||
set(CYTHON_VERSION 0.29.26)
|
||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION
|
||||
# defined below. At this time of writing, 0.17.0 was already released,
|
||||
# but built against ZSTD 1.5.1, while we use 1.5.0.
|
||||
# but built against zstd 1.5.1, while we use 1.5.0.
|
||||
set(ZSTANDARD_VERSION 0.16.0)
|
||||
# Auto-format Python source (developer tool, not used by Blender at run-time).
|
||||
set(AUTOPEP8_VERSION 1.6.0)
|
||||
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||
set(PYCODESTYLE_VERSION 2.8.0)
|
||||
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||
set(TOML_VERSION 0.10.2)
|
||||
# Build system for other packages (not used by Blender at run-time).
|
||||
set(MESON_VERSION 0.63.0)
|
||||
|
||||
set(NUMPY_VERSION 1.23.5)
|
||||
set(NUMPY_SHORT_VERSION 1.23)
|
||||
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz)
|
||||
set(NUMPY_HASH 8b2692a511a3795f3af8af2cd7566a15)
|
||||
set(NUMPY_VERSION 1.22.0)
|
||||
set(NUMPY_SHORT_VERSION 1.22)
|
||||
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
|
||||
set(NUMPY_HASH 252de134862a27bd66705d29622edbfe)
|
||||
set(NUMPY_HASH_TYPE MD5)
|
||||
set(NUMPY_FILE numpy-${NUMPY_VERSION}.tar.gz)
|
||||
set(NUMPY_FILE numpy-${NUMPY_VERSION}.zip)
|
||||
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(LAME_VERSION 3.100)
|
||||
@@ -359,7 +330,7 @@ set(SNDFILE_VERSION 1.1.0)
|
||||
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||
set(SNDFILE_HASH e63dead2b4f0aaf323687619d007ee6a)
|
||||
set(SNDFILE_HASH_TYPE MD5)
|
||||
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
|
||||
set(SNDFILE_CPE "cpe:2.3:a:libsndfile_project:libsndfile:${SNDFILE_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(WEBP_VERSION 1.2.2)
|
||||
@@ -369,9 +340,9 @@ set(WEBP_HASH_TYPE MD5)
|
||||
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
|
||||
set(WEBP_CPE "cpe:2.3:a:webmproject:libwebp:${WEBP_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(SPNAV_VERSION 1.1)
|
||||
set(SPNAV_URI https://github.com/FreeSpacenav/libspnav/releases/download/v${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 7c0032034672dfba3c4bb9b49a440e70)
|
||||
set(SPNAV_VERSION 0.2.3)
|
||||
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
|
||||
set(SPNAV_HASH_TYPE MD5)
|
||||
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
|
||||
|
||||
@@ -388,9 +359,9 @@ set(XML2_HASH_TYPE MD5)
|
||||
set(XML2_FILE libxml2-${XML2_VERSION}.tar.xz)
|
||||
set(XML2_CPE "cpe:2.3:a:xmlsoft:libxml2:${XML2_VERSION}:*:*:*:*:*:*:*")
|
||||
|
||||
set(YAMLCPP_VERSION 0.7.0)
|
||||
set(YAMLCPP_VERSION 0.6.3)
|
||||
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
|
||||
set(YAMLCPP_HASH 74d646a3cc1b5d519829441db96744f0)
|
||||
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
|
||||
set(YAMLCPP_HASH_TYPE MD5)
|
||||
set(YAMLCPP_FILE yaml-cpp-${YAMLCPP_VERSION}.tar.gz)
|
||||
set(YAMLCPP "cpe:2.3:a:yaml-cpp_project:yaml-cpp:${YAMLCPP_VERSION}:*:*:*:*:*:*:*")
|
||||
@@ -459,7 +430,9 @@ set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
|
||||
set(LZMA_HASH_TYPE SHA256)
|
||||
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
|
||||
|
||||
# NOTE: Python's build has been modified to use our ssl version.
|
||||
# NOTE: This will *HAVE* to match the version python ships on windows which
|
||||
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
|
||||
# can be no exceptions to this.
|
||||
set(SSL_VERSION 1.1.1q)
|
||||
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
|
||||
set(SSL_HASH d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca)
|
||||
@@ -470,10 +443,10 @@ set(SSL_CPE "cpe:2.3:a:openssl:openssl:${SSL_VERSION}:*:*:*:*:*:*:*")
|
||||
# Note: This will *HAVE* to match the version python ships on windows which
|
||||
# is hardcoded in pythons PCbuild/get_externals.bat for compliance reasons there
|
||||
# can be no exceptions to this.
|
||||
set(SQLITE_VERSION 3.39.4)
|
||||
set(SQLLITE_LONG_VERSION 3390400)
|
||||
set(SQLITE_VERSION 3.37.2)
|
||||
set(SQLLITE_LONG_VERSION 3370200)
|
||||
set(SQLITE_URI https://www.sqlite.org/2022/sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||
set(SQLITE_HASH c4c5c39269d1b9bb1487cff580c1f583608229b2)
|
||||
set(SQLITE_HASH e56faacadfb4154f8fbd0f2a3f827d13706b70a1)
|
||||
set(SQLITE_HASH_TYPE SHA1)
|
||||
set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
|
||||
@@ -484,18 +457,12 @@ set(EMBREE_HASH 52d0be294d6c88ba7a6c9e046796e7be)
|
||||
set(EMBREE_HASH_TYPE MD5)
|
||||
set(EMBREE_FILE embree-v${EMBREE_VERSION}.zip)
|
||||
|
||||
set(USD_VERSION 22.11)
|
||||
set(USD_VERSION 22.03)
|
||||
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
|
||||
set(USD_HASH 8c89459e48a2ef0e7ae9e7e490377507)
|
||||
set(USD_HASH e0e441a05057692a83124a1195b09eed)
|
||||
set(USD_HASH_TYPE MD5)
|
||||
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
|
||||
|
||||
set(MATERIALX_VERSION 1.38.6)
|
||||
set(MATERIALX_URI https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v${MATERIALX_VERSION}.tar.gz)
|
||||
set(MATERIALX_HASH d49c9fdef34b5702fc60058d3e1864f2)
|
||||
set(MATERIALX_HASH_TYPE MD5)
|
||||
set(MATERIALX_FILE materialx-v${MATERIALX_VERSION}.tar.gz)
|
||||
|
||||
set(OIDN_VERSION 1.4.3)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
set(OIDN_HASH 027093eaf5e8b4e45835b991137b38e6)
|
||||
@@ -741,60 +708,3 @@ set(AOM_URI https://storage.googleapis.com/aom-releases/libaom-${AOM_VERSION}.ta
|
||||
set(AOM_HASH bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354)
|
||||
set(AOM_HASH_TYPE SHA256)
|
||||
set(AOM_FILE libaom-${AOM_VERSION}.tar.gz)
|
||||
|
||||
set(FRIBIDI_VERSION v1.0.12)
|
||||
set(FRIBIDI_URI https://github.com/fribidi/fribidi/archive/refs/tags/${FRIBIDI_VERSION}.tar.gz)
|
||||
set(FRIBIDI_HASH 2e9e859876571f03567ac91e5ed3b5308791f31cda083408c2b60fa1fe00a39d)
|
||||
set(FRIBIDI_HASH_TYPE SHA256)
|
||||
set(FRIBIDI_FILE fribidi-${FRIBIDI_VERSION}.tar.gz)
|
||||
|
||||
set(HARFBUZZ_VERSION 5.1.0)
|
||||
set(HARFBUZZ_URI https://github.com/harfbuzz/harfbuzz/archive/refs/tags/${HARFBUZZ_VERSION}.tar.gz)
|
||||
set(HARFBUZZ_HASH 5352ff2eec538ea9a63a485cf01ad8332a3f63aa79921c5a2e301cef185caea1)
|
||||
set(HARFBUZZ_HASH_TYPE SHA256)
|
||||
set(HARFBUZZ_FILE harfbuzz-${HARFBUZZ_VERSION}.tar.gz)
|
||||
|
||||
set(SHADERC_VERSION v2022.3)
|
||||
set(SHADERC_URI https://github.com/google/shaderc/archive/${SHADERC_VERSION}.tar.gz)
|
||||
set(SHADERC_HASH 5cb762af57637caf997d5f46baa4e8a4)
|
||||
set(SHADERC_HASH_TYPE MD5)
|
||||
set(SHADERC_FILE shaderc-${SHADERC_VERSION}.tar.gz)
|
||||
|
||||
# The versions of shaderc's dependencies can be found in the root of shaderc's
|
||||
# source in a file called DEPS.
|
||||
|
||||
set(SHADERC_SPIRV_TOOLS_VERSION eb0a36633d2acf4de82588504f951ad0f2cecacb)
|
||||
set(SHADERC_SPIRV_TOOLS_URI https://github.com/KhronosGroup/SPIRV-Tools/archive/${SHADERC_SPIRV_TOOLS_VERSION}.tar.gz)
|
||||
set(SHADERC_SPIRV_TOOLS_HASH a4bdb8161f0e959c75d0d82d367c24f2)
|
||||
set(SHADERC_SPIRV_TOOLS_HASH_TYPE MD5)
|
||||
set(SHADERC_SPIRV_TOOLS_FILE SPIRV-Tools-${SHADERC_SPIRV_TOOLS_VERSION}.tar.gz)
|
||||
|
||||
set(SHADERC_SPIRV_HEADERS_VERSION 85a1ed200d50660786c1a88d9166e871123cce39)
|
||||
set(SHADERC_SPIRV_HEADERS_URI https://github.com/KhronosGroup/SPIRV-Headers/archive/${SHADERC_SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
set(SHADERC_SPIRV_HEADERS_HASH 10d5e8160f39344a641523810b075568)
|
||||
set(SHADERC_SPIRV_HEADERS_HASH_TYPE MD5)
|
||||
set(SHADERC_SPIRV_HEADERS_FILE SPIRV-Headers-${SHADERC_SPIRV_HEADERS_VERSION}.tar.gz)
|
||||
|
||||
set(SHADERC_GLSLANG_VERSION 89db4e1caa273a057ea46deba709c6e50001b314)
|
||||
set(SHADERC_GLSLANG_URI https://github.com/KhronosGroup/glslang/archive/${SHADERC_GLSLANG_VERSION}.tar.gz)
|
||||
set(SHADERC_GLSLANG_HASH 3b3c79ad8e9132ffcb8b63cc29c532e2)
|
||||
set(SHADERC_GLSLANG_HASH_TYPE MD5)
|
||||
set(SHADERC_GLSLANG_FILE glslang-${SHADERC_GLSLANG_VERSION}.tar.gz)
|
||||
|
||||
set(VULKAN_VERSION v1.2.198)
|
||||
|
||||
set(VULKAN_HEADERS_URI https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/${VULKAN_VERSION}.tar.gz)
|
||||
set(VULKAN_HEADERS_HASH 64fe73e887c963ad546bfc7f9505fa1d)
|
||||
set(VULKAN_HEADERS_HASH_TYPE MD5)
|
||||
set(VULKAN_HEADERS_FILE Vulkan-Headers-${VULKAN_VERSION}.tar.gz)
|
||||
|
||||
set(VULKAN_LOADER_URI https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/${VULKAN_VERSION}.tar.gz)
|
||||
set(VULKAN_LOADER_HASH 015170a74f648fd2b41e209b6bf1ebc4)
|
||||
set(VULKAN_LOADER_HASH_TYPE MD5)
|
||||
set(VULKAN_LOADER_FILE Vulkan-Loader-${VULKAN_VERSION}.tar.gz)
|
||||
|
||||
set(PYBIND11_VERSION 2.10.1)
|
||||
set(PYBIND11_URI https://github.com/pybind/pybind11/archive/refs/tags/v${PYBIND11_VERSION}.tar.gz)
|
||||
set(PYBIND11_HASH ce07bfd5089245da7807b3faf6cbc878)
|
||||
set(PYBIND11_HASH_TYPE MD5)
|
||||
set(PYBIND11_FILE pybind-v${PYBIND11_VERSION}.tar.gz)
|
||||
|
@@ -1,54 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(VULKAN_HEADERS_EXTRA_ARGS)
|
||||
|
||||
ExternalProject_Add(external_vulkan_headers
|
||||
URL file://${PACKAGE_DIR}/${VULKAN_HEADERS_FILE}
|
||||
URL_HASH ${VULKAN_HEADERS_HASH_TYPE}=${VULKAN_HEADERS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vulkan_headers
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/vulkan_headers -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${VULKAN_HEADERS_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/vulkan_headers
|
||||
)
|
||||
|
||||
set(VULKAN_LOADER_EXTRA_ARGS
|
||||
-DVULKAN_HEADERS_INSTALL_DIR=${LIBDIR}/vulkan_headers
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# These are used in `cmake/FindWayland.cmake` from `external_vulkan_loader`.
|
||||
# NOTE: When upgrading to CMAKE 3.22 we it would be cleaner to use: `PKG_CONFIG_ARGN`,
|
||||
# so `pkgconfig` would find wayland.
|
||||
set(VULKAN_LOADER_EXTRA_ARGS
|
||||
${VULKAN_LOADER_EXTRA_ARGS}
|
||||
-DPKG_WAYLAND_INCLUDE_DIRS=${LIBDIR}/wayland/include
|
||||
-DPKG_WAYLAND_LIBRARY_DIRS=${LIBDIR}/wayland/lib64
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_vulkan_loader
|
||||
URL file://${PACKAGE_DIR}/${VULKAN_LOADER_FILE}
|
||||
URL_HASH ${VULKAN_LOADER_HASH_TYPE}=${VULKAN_LOADER_HASH}
|
||||
PREFIX ${BUILD_DIR}/vulkan_loader
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/vulkan_loader -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${VULKAN_LOADER_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/vulkan_loader
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_vulkan_loader
|
||||
external_vulkan_headers
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_dependencies(
|
||||
external_vulkan_loader
|
||||
external_wayland
|
||||
)
|
||||
elseif(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_vulkan_loader after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/vulkan_loader/ ${HARVEST_TARGET}/vulkan
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/vulkan_headers/ ${HARVEST_TARGET}/vulkan
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -5,6 +5,7 @@ ExternalProject_Add(external_wayland
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
|
||||
PREFIX ${BUILD_DIR}/wayland
|
||||
PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/wayland/src/external_wayland < ${PATCH_DIR}/wayland.diff
|
||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
|
||||
#
|
||||
# NOTE: passing link args "ffi/lib" should not be needed, but
|
||||
@@ -13,7 +14,7 @@ ExternalProject_Add(external_wayland
|
||||
# NOTE: `-lm` is needed for `libxml2` which is a static library that uses `libm.so`,
|
||||
# without this, math symbols such as `floor` aren't found.
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/expat/lib/pkgconfig:${LIBDIR}/xml2/lib/pkgconfig:${LIBDIR}/ffi/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
${MESON} --prefix ${LIBDIR}/wayland -Ddocumentation=false -Dtests=false -D "c_link_args=-L${LIBDIR}/ffi/lib -lm" . ../external_wayland
|
||||
meson --prefix ${LIBDIR}/wayland -Ddocumentation=false -Dtests=false -D "c_link_args=-L${LIBDIR}/ffi/lib -lm" . ../external_wayland
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
@@ -23,7 +24,4 @@ add_dependencies(
|
||||
external_expat
|
||||
external_xml2
|
||||
external_ffi
|
||||
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -7,7 +7,7 @@ ExternalProject_Add(external_wayland_protocols
|
||||
PREFIX ${BUILD_DIR}/wayland-protocols
|
||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own WAYLAND.
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${LIBDIR}/wayland/lib64/pkgconfig:$PKG_CONFIG_PATH
|
||||
${MESON} --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
|
||||
meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false
|
||||
BUILD_COMMAND ninja
|
||||
INSTALL_COMMAND ninja install
|
||||
)
|
||||
@@ -15,6 +15,4 @@ ExternalProject_Add(external_wayland_protocols
|
||||
add_dependencies(
|
||||
external_wayland_protocols
|
||||
external_wayland
|
||||
# Needed for `MESON`.
|
||||
external_python_site_packages
|
||||
)
|
||||
|
@@ -10,8 +10,7 @@ if(WIN32)
|
||||
set(YAMLCPP_EXTRA_ARGS
|
||||
${YAMLCPP_EXTRA_ARGS}
|
||||
-DBUILD_GMOCK=OFF
|
||||
-DYAML_MSVC_SHARED_RT=ON
|
||||
)
|
||||
-DYAML_MSVC_SHARED_RT=ON)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_yamlcpp
|
||||
@@ -19,7 +18,6 @@ ExternalProject_Add(external_yamlcpp
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${YAMLCPP_HASH_TYPE}=${YAMLCPP_HASH}
|
||||
PREFIX ${BUILD_DIR}/yamlcpp
|
||||
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/yamlcpp ${DEFAULT_CMAKE_FLAGS} ${YAMLCPP_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/yamlcpp
|
||||
)
|
||||
|
@@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# macOS utility to remove all `rpaths` and add a new one.
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
# Strip version numbers from dependenciesm macOS notarizatiom fails
|
||||
# with version symlinks.
|
||||
def strip_lib_version(name):
|
||||
name = re.sub(r'(\.[0-9]+)+.dylib', '.dylib', name)
|
||||
name = re.sub(r'(\.[0-9]+)+.so', '.so', name)
|
||||
name = re.sub(r'(\.[0-9]+)+.cpython', '.cpython', name)
|
||||
return name
|
||||
|
||||
|
||||
rpath = sys.argv[1]
|
||||
file = sys.argv[2]
|
||||
|
||||
# Find existing rpaths and delete them one by one.
|
||||
p = subprocess.run(['otool', '-l', file], capture_output=True)
|
||||
tokens = p.stdout.split()
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
if token == b'LC_RPATH':
|
||||
old_rpath = tokens[i + 4]
|
||||
subprocess.run(['install_name_tool', '-delete_rpath', old_rpath, file])
|
||||
|
||||
subprocess.run(['install_name_tool', '-add_rpath', rpath, file])
|
||||
|
||||
# Strip version from dependencies.
|
||||
p = subprocess.run(['otool', '-L', file], capture_output=True)
|
||||
tokens = p.stdout.split()
|
||||
for i, token in enumerate(tokens):
|
||||
token = token.decode("utf-8")
|
||||
if token.startswith("@rpath"):
|
||||
new_token = strip_lib_version(token)
|
||||
subprocess.run(['install_name_tool', '-change', token, new_token, file])
|
||||
|
||||
# Strip version from library itself.
|
||||
new_file = strip_lib_version(file)
|
||||
new_id = '@rpath/' + os.path.basename(new_file)
|
||||
os.rename(file, new_file)
|
||||
subprocess.run(['install_name_tool', '-id', new_id, new_file])
|
@@ -39,15 +39,15 @@ with-all,with-opencollada,with-jack,with-pulseaudio,with-embree,with-oidn,with-n
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-level-zero:\
|
||||
force-all,force-python,force-boost,force-tbb,\
|
||||
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-materialx,force-usd,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
||||
force-xr-openxr,force-level-zero,force-openpgl,\
|
||||
build-all,build-python,build-boost,build-tbb,\
|
||||
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-materialx,build-usd,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
||||
build-xr-openxr,build-level-zero,build-openpgl,\
|
||||
skip-python,skip-boost,skip-tbb,\
|
||||
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-materialx,skip-usd,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
||||
skip-xr-openxr,skip-level-zero,skip-openpgl \
|
||||
-- "$@" \
|
||||
)
|
||||
@@ -223,9 +223,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-ffmpeg
|
||||
Force the build of FFMpeg.
|
||||
|
||||
--build-materialx
|
||||
Force the build of MaterialX.
|
||||
|
||||
--build-usd
|
||||
Force the build of Universal Scene Description.
|
||||
|
||||
@@ -299,9 +296,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-ffmpeg
|
||||
Force the rebuild of FFMpeg.
|
||||
|
||||
--force-materialx
|
||||
Force the rebuild of MaterialX.
|
||||
|
||||
--force-usd
|
||||
Force the rebuild of Universal Scene Description.
|
||||
|
||||
@@ -368,9 +362,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--skip-ffmpeg
|
||||
Unconditionally skip FFMpeg installation/building.
|
||||
|
||||
--skip-materialx
|
||||
Unconditionally skip MaterialX installation/building.
|
||||
|
||||
--skip-usd
|
||||
Unconditionally skip Universal Scene Description installation/building.
|
||||
|
||||
@@ -403,7 +394,7 @@ CLANG_FORMAT_VERSION="10.0"
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
CLANG_FORMAT_VERSION_MEX="14.0"
|
||||
|
||||
PYTHON_VERSION="3.10.9"
|
||||
PYTHON_VERSION="3.10.8"
|
||||
PYTHON_VERSION_SHORT="3.10"
|
||||
PYTHON_VERSION_MIN="3.10"
|
||||
PYTHON_VERSION_MEX="3.12"
|
||||
@@ -411,7 +402,6 @@ PYTHON_VERSION_INSTALLED=$PYTHON_VERSION_SHORT
|
||||
PYTHON_FORCE_BUILD=false
|
||||
PYTHON_FORCE_REBUILD=false
|
||||
PYTHON_SKIP=false
|
||||
_with_built_python=false
|
||||
|
||||
# Additional Python modules.
|
||||
PYTHON_IDNA_VERSION="3.3"
|
||||
@@ -444,7 +434,7 @@ PYTHON_ZSTANDARD_VERSION_MIN="0.15.2"
|
||||
PYTHON_ZSTANDARD_VERSION_MEX="0.20.0"
|
||||
PYTHON_ZSTANDARD_NAME="zstandard"
|
||||
|
||||
PYTHON_NUMPY_VERSION="1.23.5"
|
||||
PYTHON_NUMPY_VERSION="1.22.0"
|
||||
PYTHON_NUMPY_VERSION_MIN="1.14"
|
||||
PYTHON_NUMPY_VERSION_MEX="2.0"
|
||||
PYTHON_NUMPY_NAME="numpy"
|
||||
@@ -472,13 +462,11 @@ PYTHON_MODULES_PIP=(
|
||||
)
|
||||
|
||||
|
||||
BOOST_VERSION="1.80.0"
|
||||
BOOST_VERSION_SHORT="1.80"
|
||||
BOOST_VERSION="1.78.0"
|
||||
BOOST_VERSION_SHORT="1.78"
|
||||
BOOST_VERSION_MIN="1.49"
|
||||
BOOST_VERSION_MEX="2.0"
|
||||
# XXX Boost currently has an issue with python/tbb, see rB019b930 for details and patch used to fix it.
|
||||
# So for now it has to be built, system packages are not usable. :(
|
||||
BOOST_FORCE_BUILD=true
|
||||
BOOST_FORCE_BUILD=false
|
||||
BOOST_FORCE_REBUILD=false
|
||||
BOOST_SKIP=false
|
||||
|
||||
@@ -491,8 +479,8 @@ TBB_FORCE_BUILD=false
|
||||
TBB_FORCE_REBUILD=false
|
||||
TBB_SKIP=false
|
||||
|
||||
OCIO_VERSION="2.2.0"
|
||||
OCIO_VERSION_SHORT="2.2"
|
||||
OCIO_VERSION="2.1.1"
|
||||
OCIO_VERSION_SHORT="2.1"
|
||||
OCIO_VERSION_MIN="2.0"
|
||||
OCIO_VERSION_MEX="3.0"
|
||||
OCIO_FORCE_BUILD=false
|
||||
@@ -517,10 +505,10 @@ OPENEXR_FORCE_REBUILD=false
|
||||
OPENEXR_SKIP=false
|
||||
_with_built_openexr=false
|
||||
|
||||
OIIO_VERSION="2.4.6.0"
|
||||
OIIO_VERSION_SHORT="2.4"
|
||||
OIIO_VERSION_MIN="2.2.0"
|
||||
OIIO_VERSION_MEX="2.5.0"
|
||||
OIIO_VERSION="2.3.20.0"
|
||||
OIIO_VERSION_SHORT="2.3"
|
||||
OIIO_VERSION_MIN="2.1.12"
|
||||
OIIO_VERSION_MEX="2.4.0"
|
||||
OIIO_FORCE_BUILD=false
|
||||
OIIO_FORCE_REBUILD=false
|
||||
OIIO_SKIP=false
|
||||
@@ -535,8 +523,8 @@ LLVM_FORCE_REBUILD=false
|
||||
LLVM_SKIP=false
|
||||
|
||||
# OSL needs to be compiled for now!
|
||||
OSL_VERSION="1.13.0.2"
|
||||
OSL_VERSION_SHORT="1.13"
|
||||
OSL_VERSION="1.12.6.2"
|
||||
OSL_VERSION_SHORT="1.12"
|
||||
OSL_VERSION_MIN="1.11"
|
||||
OSL_VERSION_MEX="2.0"
|
||||
OSL_FORCE_BUILD=false
|
||||
@@ -544,9 +532,9 @@ OSL_FORCE_REBUILD=false
|
||||
OSL_SKIP=false
|
||||
|
||||
# OpenSubdiv needs to be compiled for now
|
||||
OSD_VERSION="3.5.0"
|
||||
OSD_VERSION_SHORT="3.5"
|
||||
OSD_VERSION_MIN="3.5"
|
||||
OSD_VERSION="3.4.4"
|
||||
OSD_VERSION_SHORT="3.4"
|
||||
OSD_VERSION_MIN="3.4"
|
||||
OSD_VERSION_MEX="4.0"
|
||||
OSD_FORCE_BUILD=false
|
||||
OSD_FORCE_REBUILD=false
|
||||
@@ -555,10 +543,10 @@ OSD_SKIP=false
|
||||
# OpenVDB needs to be compiled for now
|
||||
OPENVDB_BLOSC_VERSION="1.21.1"
|
||||
|
||||
OPENVDB_VERSION="10.0.0"
|
||||
OPENVDB_VERSION_SHORT="10.0"
|
||||
OPENVDB_VERSION_MIN="10.0"
|
||||
OPENVDB_VERSION_MEX="11.0"
|
||||
OPENVDB_VERSION="9.0.0"
|
||||
OPENVDB_VERSION_SHORT="9.0"
|
||||
OPENVDB_VERSION_MIN="9.0"
|
||||
OPENVDB_VERSION_MEX="9.1"
|
||||
OPENVDB_FORCE_BUILD=false
|
||||
OPENVDB_FORCE_REBUILD=false
|
||||
OPENVDB_SKIP=false
|
||||
@@ -572,16 +560,8 @@ ALEMBIC_FORCE_BUILD=false
|
||||
ALEMBIC_FORCE_REBUILD=false
|
||||
ALEMBIC_SKIP=false
|
||||
|
||||
MATERIALX_VERSION="1.38.6"
|
||||
MATERIALX_VERSION_SHORT="1.38"
|
||||
MATERIALX_VERSION_MIN="1.38"
|
||||
MATERIALX_VERSION_MEX="1.40"
|
||||
MATERIALX_FORCE_BUILD=false
|
||||
MATERIALX_FORCE_REBUILD=false
|
||||
MATERIALX_SKIP=false
|
||||
|
||||
USD_VERSION="22.11"
|
||||
USD_VERSION_SHORT="22.11"
|
||||
USD_VERSION="22.03"
|
||||
USD_VERSION_SHORT="22.03"
|
||||
USD_VERSION_MIN="20.05"
|
||||
USD_VERSION_MEX="23.00"
|
||||
USD_FORCE_BUILD=false
|
||||
@@ -916,9 +896,6 @@ while true; do
|
||||
--build-alembic)
|
||||
ALEMBIC_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-materialx)
|
||||
MATERIALX_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-usd)
|
||||
USD_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
@@ -948,7 +925,6 @@ while true; do
|
||||
OIDN_FORCE_REBUILD=true
|
||||
FFMPEG_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
MATERIALX_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
XR_OPENXR_FORCE_REBUILD=true
|
||||
LEVEL_ZERO_FORCE_REBUILD=true
|
||||
@@ -1004,9 +980,6 @@ while true; do
|
||||
--force-alembic)
|
||||
ALEMBIC_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-materialx)
|
||||
MATERIALX_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-usd)
|
||||
USD_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
@@ -1070,9 +1043,6 @@ while true; do
|
||||
--skip-usd)
|
||||
USD_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-materialx)
|
||||
MATERIALX_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-xr-openxr)
|
||||
XR_OPENXR_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -1138,9 +1108,7 @@ PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHO
|
||||
|
||||
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
||||
BOOST_SOURCE=( "https://boostorg.jfrog.io/artifactory/main/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
|
||||
BOOST_BUILD_MODULES="--with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time --with-wave --with-atomic --with-serialization --with-program_options --with-iostreams --with-python"
|
||||
# Used by debian distros.
|
||||
BOOST_DEB_PACKAGE_MODULES=( "libboost-filesystem" "libboost-locale" "libboost-thread" "libboost-regex" "libboost-system" "libboost-date-time" "libboost-wave" "libboost-atomic" "libboost-serialization" "libboost-program-options" "libboost-iostreams" "libboost-python" "libboost-numpy" )
|
||||
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options --with-serialization --with-atomic"
|
||||
|
||||
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
|
||||
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
|
||||
@@ -1170,11 +1138,17 @@ _LLVM_SOURCE_ROOT="https://github.com/llvm/llvm-project/releases/download/llvmor
|
||||
LLVM_SOURCE=( "$_LLVM_SOURCE_ROOT/llvm-$LLVM_VERSION.src.tar.xz" )
|
||||
LLVM_CLANG_SOURCE=( "$_LLVM_SOURCE_ROOT/clang-$LLVM_VERSION.src.tar.xz" "$_LLVM_SOURCE_ROOT/cfe-$LLVM_VERSION.src.tar.xz" )
|
||||
|
||||
OSL_USE_REPO=true
|
||||
OSL_USE_REPO=false
|
||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/v$OSL_VERSION.tar.gz" )
|
||||
OSL_SOURCE_REPO=( "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git" )
|
||||
OSL_SOURCE_REPO_BRANCH="main"
|
||||
OSL_SOURCE_REPO_UID="1a7670600c8b08c2443a78d03c8c27e9a1149140"
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_BRANCH="master"
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
#~ OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
|
||||
#~ OSL_SOURCE_REPO_BRANCH="blender-fixes"
|
||||
|
||||
OSD_USE_REPO=false
|
||||
# Script foo to make the version string compliant with the archive name:
|
||||
@@ -1197,8 +1171,6 @@ ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.
|
||||
# ALEMBIC_SOURCE_REPO_UID="e6c90d4faa32c4550adeaaf3f556dad4b73a92bb"
|
||||
# ALEMBIC_SOURCE_REPO_BRANCH="master"
|
||||
|
||||
MATERIALX_SOURCE=( "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v${MATERIALX_VERSION}.tar.gz" )
|
||||
|
||||
USD_SOURCE=( "https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz" )
|
||||
|
||||
OPENCOLLADA_USE_REPO=false
|
||||
@@ -1251,10 +1223,8 @@ Those libraries should be available as packages in all recent distributions (opt
|
||||
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
|
||||
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
||||
* libwayland-client0, libdecor, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex, pybind11.
|
||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].
|
||||
* [libvulkan/vulkan-loader].
|
||||
* [libfribidi], [libharfbuzz].\""
|
||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex.
|
||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\""
|
||||
|
||||
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
||||
|
||||
@@ -1515,17 +1485,9 @@ _init_python() {
|
||||
_update_deps_python() {
|
||||
if [ "$1" = true ]; then
|
||||
BOOST_FORCE_BUILD=true
|
||||
OCIO_FORCE_BUILD=true
|
||||
OIIO_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
BOOST_FORCE_REBUILD=true
|
||||
OCIO_FORCE_REBUILD=true
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1611,9 +1573,6 @@ compile_Python() {
|
||||
PRINT ""
|
||||
$_python -m pip install $module --no-binary :all:
|
||||
done
|
||||
|
||||
_with_built_python=true
|
||||
_with_built_python_execpath="$INST/python-$PYTHON_VERSION_SHORT/bin/python3"
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -1632,14 +1591,12 @@ _update_deps_boost() {
|
||||
OSL_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OSL_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1659,7 +1616,7 @@ compile_Boost() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
boost_magic=15
|
||||
boost_magic=14
|
||||
|
||||
_init_boost
|
||||
|
||||
@@ -1685,13 +1642,11 @@ compile_Boost() {
|
||||
mkdir -p $SRC
|
||||
download BOOST_SOURCE[@] $_src.tar.bz2
|
||||
tar -C $SRC --transform "s,\w*,boost-$BOOST_VERSION,x" -xf $_src.tar.bz2
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/boost.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
if [ ! -f $_src/b2 ]; then
|
||||
if [ -d $_with_built_python ]; then
|
||||
if [ -d $INST/python-$PYTHON_VERSION_INSTALLED ]; then
|
||||
./bootstrap.sh --with-python-root="$INST/python-$PYTHON_VERSION_INSTALLED"
|
||||
else
|
||||
./bootstrap.sh
|
||||
@@ -1886,7 +1841,7 @@ compile_OCIO() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
ocio_magic=5
|
||||
ocio_magic=3
|
||||
_init_ocio
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -1941,13 +1896,9 @@ compile_OCIO() {
|
||||
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=ON"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=OFF"
|
||||
cmake_d="$cmake_d -D OCIO_BUILD_GPU_TESTS=OFF"
|
||||
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
if [ $(uname -m) == "aarch64" ]; then
|
||||
cmake_d="$cmake_d -D OCIO_USE_SSE=OFF"
|
||||
fi
|
||||
@@ -2137,13 +2088,11 @@ _update_deps_openexr() {
|
||||
OIIO_FORCE_BUILD=true
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OIIO_FORCE_REBUILD=true
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2272,11 +2221,9 @@ _init_oiio() {
|
||||
_update_deps_oiio() {
|
||||
if [ "$1" = true ]; then
|
||||
OSL_FORCE_BUILD=true
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
OSL_FORCE_REBUILD=true
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2296,7 +2243,7 @@ compile_OIIO() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
oiio_magic=20
|
||||
oiio_magic=18
|
||||
_init_oiio
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2350,7 +2297,6 @@ compile_OIIO() {
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
||||
cmake_d="$cmake_d -D LINKSTATIC=OFF"
|
||||
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||
|
||||
if [ $(uname -m) != "aarch64" ]; then
|
||||
cmake_d="$cmake_d -D USE_SIMD=sse2"
|
||||
@@ -2366,37 +2312,21 @@ compile_OIIO() {
|
||||
cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -D USE_PYTHON=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
# ptex is only needed when nicholas bishop is ready
|
||||
cmake_d="$cmake_d -D USE_PTEX=OFF"
|
||||
|
||||
# Optional tests and cmd tools
|
||||
cmake_d="$cmake_d -D USE_QT=OFF"
|
||||
cmake_d="$cmake_d -D USE_QT5=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENGL=OFF"
|
||||
cmake_d="$cmake_d -D USE_TBB=OFF"
|
||||
cmake_d="$cmake_d -D USE_BZIP2=OFF"
|
||||
cmake_d="$cmake_d -D USE_FREETYPE=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENCOLORIO=OFF"
|
||||
|
||||
cmake_d="$cmake_d -D USE_WEBP=ON"
|
||||
cmake_d="$cmake_d -D USE_OPENJPEG=ON"
|
||||
|
||||
cmake_d="$cmake_d -D USE_PYTHON=OFF"
|
||||
cmake_d="$cmake_d -D USE_FFMPEG=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENCV=OFF"
|
||||
cmake_d="$cmake_d -D USE_OPENVDB=OFF"
|
||||
cmake_d="$cmake_d -D USE_NUKE=OFF"
|
||||
cmake_d="$cmake_d -D USE_DCMTK=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBHEIF=OFF"
|
||||
cmake_d="$cmake_d -D USE_GIF=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBRAW=OFF"
|
||||
cmake_d="$cmake_d -D USE_LIBSQUISH=OFF"
|
||||
|
||||
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=ON"
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -D TXT2MAN="
|
||||
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
||||
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
|
||||
|
||||
if [ -d $INST/boost ]; then
|
||||
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON -D Boost_NO_BOOST_CMAKE=ON"
|
||||
@@ -2474,7 +2404,7 @@ compile_LLVM() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
llvm_magic=4
|
||||
llvm_magic=3
|
||||
_init_llvm
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2523,9 +2453,9 @@ compile_LLVM() {
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
LLVM_TARGETS="X86;NVPTX"
|
||||
LLVM_TARGETS="X86"
|
||||
if [ $(uname -m) == "aarch64" ]; then
|
||||
LLVM_TARGETS="AArch64;NVPTX"
|
||||
LLVM_TARGETS="AArch64"
|
||||
fi
|
||||
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
@@ -2592,7 +2522,7 @@ compile_OSL() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
osl_magic=22
|
||||
osl_magic=21
|
||||
_init_osl
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -2623,9 +2553,8 @@ compile_OSL() {
|
||||
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
||||
-xf $_src.tar.gz
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
@@ -2637,8 +2566,6 @@ compile_OSL() {
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OSL_SOURCE_REPO_UID
|
||||
git reset --hard
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||
fi
|
||||
|
||||
# Always refresh the whole build!
|
||||
@@ -2954,12 +2881,7 @@ _init_openvdb() {
|
||||
}
|
||||
|
||||
_update_deps_openvdb() {
|
||||
if [ "$1" = true ]; then
|
||||
USD_FORCE_BUILD=true
|
||||
fi
|
||||
if [ "$2" = true ]; then
|
||||
USD_FORCE_REBUILD=true
|
||||
fi
|
||||
:
|
||||
}
|
||||
|
||||
clean_OPENVDB() {
|
||||
@@ -2981,7 +2903,7 @@ compile_OPENVDB() {
|
||||
PRINT ""
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
openvdb_magic=5
|
||||
openvdb_magic=4
|
||||
_init_openvdb
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -3030,18 +2952,12 @@ compile_OPENVDB() {
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D USE_STATIC_DEPENDENCIES=OFF"
|
||||
cmake_d="$cmake_d -D OPENVDB_CORE_SHARED=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_CORE_STATIC=OFF"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF"
|
||||
|
||||
if [ "$WITH_NANOVDB" = true ]; then
|
||||
cmake_d="$cmake_d -D USE_NANOVDB=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=ON"
|
||||
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||
else
|
||||
cmake_d="$cmake_d -D USE_NANOVDB=OFF"
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=OFF"
|
||||
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||
fi
|
||||
|
||||
if [ -d $INST/boost ]; then
|
||||
@@ -3053,9 +2969,6 @@ compile_OPENVDB() {
|
||||
fi
|
||||
if [ -d $INST/tbb ]; then
|
||||
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb"
|
||||
# Work around until we use oneTBB, otherwise OpenVDB forcefully
|
||||
# uses oneTBB if it can find it on the system.
|
||||
cmake_d="$cmake_d -D Tbb_INCLUDE_DIR=$INST/tbb/include"
|
||||
fi
|
||||
|
||||
if [ "$_with_built_imath" = true ]; then
|
||||
@@ -3069,13 +2982,6 @@ compile_OPENVDB() {
|
||||
cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -D OPENVDB_BUILD_PYTHON_MODULE=ON"
|
||||
cmake_d="$cmake_d -D OPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON"
|
||||
cmake_d="$cmake_d -D USE_NUMPY=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake $cmake_d ..
|
||||
|
||||
make -j$THREADS install
|
||||
@@ -3213,103 +3119,6 @@ compile_ALEMBIC() {
|
||||
run_ldconfig "alembic"
|
||||
}
|
||||
|
||||
#### Build materialX ####
|
||||
_init_materialx() {
|
||||
_src=$SRC/MaterialX-$MATERIALX_VERSION
|
||||
_git=false
|
||||
_inst=$INST/materialx-$MATERIALX_VERSION_SHORT
|
||||
_inst_shortcut=$INST/materialx
|
||||
}
|
||||
|
||||
_update_deps_materialx() {
|
||||
:
|
||||
}
|
||||
|
||||
clean_MATERIALX() {
|
||||
_init_materialx
|
||||
if [ -d $_inst ]; then
|
||||
# Force rebuilding the dependencies if needed.
|
||||
_update_deps_materialx false true
|
||||
fi
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_MATERIALX() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, MaterialX will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
materialx_magic=1
|
||||
_init_materialx
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
_update_deps_materialx true false
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check materialx-$MATERIALX_VERSION $materialx_magic
|
||||
if [ $? -eq 1 -o "$MATERIALX_FORCE_REBUILD" = true ]; then
|
||||
clean_MATERIALX
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building MaterialX-$MATERIALX_VERSION"
|
||||
|
||||
# Force rebuilding the dependencies.
|
||||
_update_deps_materialx true true
|
||||
|
||||
prepare_inst
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
download MATERIALX_SOURCE[@] "$_src.tar.gz"
|
||||
|
||||
INFO "Unpacking MaterialX-$MATERIALX_VERSION"
|
||||
tar -C $SRC -xf $_src.tar.gz
|
||||
|
||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/materialx.diff
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_RENDER=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DMATERIALX_BUILD_PYTHON=ON"
|
||||
cmake_d="$cmake_d -DMATERIALX_INSTALL_PYTHON=OFF"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake $cmake_d ./
|
||||
make -j$THREADS install
|
||||
make clean
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
ERROR "MaterialX-$MATERIALX_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set materialx-$MATERIALX_VERSION $materialx_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling MaterialX-$MATERIALX_VERSION!"
|
||||
else
|
||||
INFO "Own MaterialX-$MATERIALX_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-materialx option."
|
||||
fi
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
fi
|
||||
run_ldconfig "materialx"
|
||||
}
|
||||
|
||||
#### Build USD ####
|
||||
_init_usd() {
|
||||
_src=$SRC/USD-$USD_VERSION
|
||||
@@ -3338,7 +3147,7 @@ compile_USD() {
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
usd_magic=2
|
||||
usd_magic=1
|
||||
_init_usd
|
||||
|
||||
# Force having own builds for the dependencies.
|
||||
@@ -3372,46 +3181,19 @@ compile_USD() {
|
||||
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
# For the reasoning behind these options, please see usd.cmake.
|
||||
if [ -d $INST/boost ]; then
|
||||
cmake_d="$cmake_d -DBOOST_ROOT=$INST/boost"
|
||||
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
|
||||
fi
|
||||
|
||||
if [ -d $INST/tbb ]; then
|
||||
cmake_d="$cmake_d -DTBB_ROOT_DIR=$INST/tbb"
|
||||
cmake_d="$cmake_d $cmake_d -D TBB_ROOT_DIR=$INST/tbb"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=ON"
|
||||
cmake_d="$cmake_d -DPXR_USE_PYTHON_3=ON"
|
||||
if [ "$_with_built_python" = true ]; then
|
||||
cmake_d="$cmake_d -D PYTHON_EXECUTABLE=$_with_built_python_execpath"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON"
|
||||
if [ -d $INST/openexr ]; then
|
||||
cmake_d="$cmake_d -DOPENEXR_LOCATION=$INST/openexr"
|
||||
fi
|
||||
if [ -d $INST/oiio ]; then
|
||||
cmake_d="$cmake_d -DOpenImageIO_ROOT=$INST/oiio"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_OPENVDB_SUPPORT=ON"
|
||||
if [ -d $INST/openvdb ]; then
|
||||
cmake_d="$cmake_d -DOPENVDB_LOCATION=$INST/openvdb"
|
||||
fi
|
||||
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_GL_SUPPORT=ON"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_SET_INTERNAL_NAMESPACE=usdBlender"
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_TESTS=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_EXAMPLES=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_TUTORIALS=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_HDF5_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_ENABLE_MATERIALX_SUPPORT=OFF"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USDVIEW=OFF"
|
||||
|
||||
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
||||
cmake_d="$cmake_d -DBUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
||||
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
||||
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||
|
||||
cmake $cmake_d ./
|
||||
@@ -4424,12 +4206,11 @@ install_DEB() {
|
||||
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
|
||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||
libwayland-dev libdecor-0-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
||||
libvulkan-dev libshaderc-dev \
|
||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
||||
libopenal-dev libepoxy-dev yasm pybind11-dev \
|
||||
libopenal-dev libepoxy-dev yasm \
|
||||
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
|
||||
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev \
|
||||
libglfw3-dev libfribidi-dev libharfbuzz-dev"
|
||||
libglfw3-dev"
|
||||
|
||||
VORBIS_USE=true
|
||||
OGG_USE=true
|
||||
@@ -4613,7 +4394,7 @@ install_DEB() {
|
||||
|
||||
boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||
|
||||
install_packages_DEB ${BOOST_DEB_PACKAGE_MODULES[@]/%/$boost_version-dev}
|
||||
install_packages_DEB libboost-{filesystem,iostreams,locale,regex,system,thread,wave,program-options}$boost_version-dev
|
||||
clean_Boost
|
||||
else
|
||||
compile_Boost
|
||||
@@ -4805,16 +4586,6 @@ install_DEB() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -5158,12 +4929,10 @@ install_RPM() {
|
||||
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
|
||||
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
||||
wayland-devel libdecor-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
||||
vulkan-loader-devel libshaderc-devel \
|
||||
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
||||
libepoxy-devel yasm patch pybind11-devel \
|
||||
libepoxy-devel yasm patch \
|
||||
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \
|
||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel \
|
||||
fribidi-devel harfbuzz-devel"
|
||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel"
|
||||
|
||||
OPENJPEG_USE=true
|
||||
VORBIS_USE=true
|
||||
@@ -5544,16 +5313,6 @@ install_RPM() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -5824,10 +5583,9 @@ install_ARCH() {
|
||||
|
||||
_packages="$BASE_DEVEL git cmake fontconfig flex \
|
||||
libxi libxcursor libxrandr libxinerama libepoxy libdecor libpng libtiff wget openal \
|
||||
vulkan-icd-loader vulkan-headers shaderc \
|
||||
$OPENJPEG_DEV yasm sdl2 fftw pybind11 \
|
||||
$OPENJPEG_DEV yasm sdl2 fftw \
|
||||
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \
|
||||
zstd pystring fribidi harfbuzz"
|
||||
zstd pystring"
|
||||
|
||||
OPENJPEG_USE=true
|
||||
VORBIS_USE=true
|
||||
@@ -6159,16 +5917,6 @@ install_ARCH() {
|
||||
compile_ALEMBIC
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
@@ -6460,27 +6208,6 @@ install_OTHER() {
|
||||
fi
|
||||
|
||||
|
||||
PRINT ""
|
||||
if [ "$MATERIALX_SKIP" = true ]; then
|
||||
WARNING "Skipping MaterialX installation, as requested..."
|
||||
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced MaterialX building, as requested..."
|
||||
compile_MATERIALX
|
||||
else
|
||||
compile_MATERIALX
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$USD_SKIP" = true ]; then
|
||||
WARNING "Skipping USD installation, as requested..."
|
||||
elif [ "$USD_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced USD building, as requested..."
|
||||
compile_USD
|
||||
else
|
||||
compile_USD
|
||||
fi
|
||||
|
||||
|
||||
if [ "$WITH_OPENCOLLADA" = true ]; then
|
||||
PRINT ""
|
||||
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
||||
@@ -6558,8 +6285,7 @@ print_info() {
|
||||
|
||||
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
||||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CLANG* -U *CYCLES*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*"
|
||||
_buildargs="$_buildargs -U *MATERIALX* -U *USD*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
||||
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR* -U *OPENPGL*"
|
||||
|
||||
_1="-D WITH_CODEC_SNDFILE=ON"
|
||||
@@ -6746,17 +6472,6 @@ print_info() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$MATERIALX_SKIP" = false ]; then
|
||||
_1="-D WITH_MATERIALX=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/materialx ]; then
|
||||
_1="-D MaterialX_DIR=$INST/materialx/lib/cmake/MaterialX"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$USD_SKIP" = false ]; then
|
||||
_1="-D WITH_USD=ON"
|
||||
PRINT " $_1"
|
||||
|
@@ -11,31 +11,19 @@ if [ `id -u` -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Required by: config manager command below to enable powertools.
|
||||
dnf install 'dnf-command(config-manager)'
|
||||
|
||||
# Packages `ninja-build` and `meson` are not available unless CBR or PowerTools repositories are enabled.
|
||||
# See: https://wiki.rockylinux.org/rocky/repo/#notes-on-unlisted-repositories
|
||||
dnf config-manager --set-enabled powertools
|
||||
|
||||
# Required by: epel-release has the patchelf and rubygem-asciidoctor packages
|
||||
dnf install epel-release
|
||||
|
||||
# `yum-config-manager` does not come in the default minimal install,
|
||||
# yum-config-manager does not come in the default minimal install,
|
||||
# so make sure it is installed and available.
|
||||
yum -y update
|
||||
yum -y install yum-utils
|
||||
|
||||
# Install all the packages needed for a new tool-chain.
|
||||
# Install all the packages needed for a new toolchain.
|
||||
#
|
||||
# NOTE: Keep this separate from the packages install, since otherwise
|
||||
# older tool-chain will be installed.
|
||||
# older toolchain will be installed.
|
||||
yum -y update
|
||||
yum -y install scl-utils
|
||||
yum -y install scl-utils-build
|
||||
|
||||
# Currently this is defined by the VFX platform (CY2023), see: https://vfxplatform.com
|
||||
yum -y install gcc-toolset-11
|
||||
yum -y install epel-release
|
||||
yum -y install centos-release-scl
|
||||
yum -y install devtoolset-9
|
||||
|
||||
# Install packages needed for Blender's dependencies.
|
||||
PACKAGES_FOR_LIBS=(
|
||||
@@ -59,12 +47,19 @@ PACKAGES_FOR_LIBS=(
|
||||
automake
|
||||
libtool
|
||||
|
||||
# TODO: why is this needed?
|
||||
patchelf
|
||||
|
||||
# Meta-build system used by various packages.
|
||||
meson
|
||||
# Builds generated by meson use Ninja for the actual build.
|
||||
ninja-build
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libXrandr-devel
|
||||
libXinerama-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libX11-devel
|
||||
libXt-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
mesa-libEGL-devel
|
||||
# Required by: Blender & `external_opensubdiv` (probably others).
|
||||
@@ -84,47 +79,52 @@ PACKAGES_FOR_LIBS=(
|
||||
# Why are both needed?
|
||||
yasm
|
||||
|
||||
# NOTE(@campbellbarton): while `python39` is available, the default Python version is 3.6.
|
||||
# This is used for the `python3-mako` package for e.g.
|
||||
# So use the "default" system Python since it means it's most compatible with other packages.
|
||||
python3
|
||||
# Required by: `external_mesa`.
|
||||
python3-mako
|
||||
|
||||
# Required by: `external_mesa`.
|
||||
expat-devel
|
||||
# Required by: `meson` (Python based build system).
|
||||
python36
|
||||
# Required by: `mako` (Python module used for building `external_mesa`)
|
||||
python-setuptools
|
||||
|
||||
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
||||
bison
|
||||
# Required by: `external_osl` as a build-time dependency.
|
||||
flex
|
||||
|
||||
# Required by: `external_ispc`.
|
||||
# TODO: dependencies build without this, consider removal.
|
||||
ncurses-devel
|
||||
# Required by: `external_ispc` (when building with CLANG).
|
||||
libstdc++-static
|
||||
)
|
||||
|
||||
# Additional packages needed for building Blender.
|
||||
PACKAGES_FOR_BLENDER=(
|
||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||
libxkbcommon-devel
|
||||
|
||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||
libX11-devel
|
||||
libXcursor-devel
|
||||
libXi-devel
|
||||
libXinerama-devel
|
||||
libXrandr-devel
|
||||
libXt-devel
|
||||
libXxf86vm-devel
|
||||
)
|
||||
|
||||
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
||||
|
||||
# Dependencies for pip (needed for `buildbot-worker`), uses Python3.6.
|
||||
yum -y install python3 python3-pip python3-devel
|
||||
# Dependencies for Mesa
|
||||
yum -y install expat-devel
|
||||
python3 -m pip install mako
|
||||
|
||||
# Dependencies for pip (needed for buildbot-worker).
|
||||
yum -y install python36-pip python36-devel
|
||||
|
||||
# Dependencies for asound.
|
||||
yum -y install -y \
|
||||
alsa-lib-devel pulseaudio-libs-devel
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
||||
|
||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
||||
--family cmake
|
@@ -1,12 +0,0 @@
|
||||
--- a/boost/python//detail/wrap_python.hpp 2022-12-09 19:16:17
|
||||
+++ b/boost/python//detail/wrap_python.hpp 2022-12-09 19:18:08
|
||||
@@ -206,7 +206,8 @@
|
||||
|
||||
#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||
-# define _DEBUG
|
||||
+// BLENDER: TBB excepts this to have a value.
|
||||
+# define _DEBUG 1
|
||||
# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||
# undef _CRT_NOFORCE_MANIFEST
|
@@ -1,4 +1,4 @@
|
||||
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
|
||||
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@/
|
||||
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
|
||||
: @LIBDIR@/python/libs
|
||||
;
|
@@ -1,13 +0,0 @@
|
||||
diff -Naur orig/source/PyMaterialX/PyBind11/tools/FindPythonLibsNew.cmake external_materialx/source/PyMaterialX/PyBind11/tools/FindPythonLibsNew.cmake
|
||||
--- orig/source/PyMaterialX/PyBind11/tools/FindPythonLibsNew.cmake 2022-11-04 14:23:29 -0600
|
||||
+++ external_materialx/source/PyMaterialX/PyBind11/tools/FindPythonLibsNew.cmake 2022-11-08 11:58:45 -0700
|
||||
@@ -181,6 +181,9 @@
|
||||
string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES "${PYTHON_SITE_PACKAGES}")
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
+ if(PYTHON_EXECUTABLE MATCHES "_d.exe$")
|
||||
+ set(PYTHON_LIBRARY_SUFFIX ${PYTHON_LIBRARY_SUFFIX}_d)
|
||||
+ endif()
|
||||
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/python${PYTHON_LIBRARY_SUFFIX}.lib")
|
||||
|
||||
# when run in a venv, PYTHON_PREFIX points to it. But the libraries remain in the
|
@@ -155,15 +155,3 @@ diff -Naur a/CMakeLists.txt b/CMakeLists.txt
|
||||
|
||||
# Library export
|
||||
install(EXPORT LibraryExport DESTINATION ${OPENCOLLADA_INST_CMAKECONFIG} FILE OpenCOLLADATargets.cmake)
|
||||
diff -Naur OpenCOLLADA-1.6.68/common/libBuffer/include/CommonFWriteBufferFlusher.h external_opencollada/common/libBuffer/include/CommonFWriteBufferFlusher.h
|
||||
--- OpenCOLLADA-1.6.68/common/libBuffer/include/CommonFWriteBufferFlusher.h 2018-11-26 14:43:10 -0700
|
||||
+++ external_opencollada/common/libBuffer/include/CommonFWriteBufferFlusher.h 2022-08-19 11:36:04 -0600
|
||||
@@ -23,7 +23,7 @@
|
||||
# include <tr1/unordered_map>
|
||||
#endif
|
||||
|
||||
-#ifdef _LIBCPP_VERSION
|
||||
+#if defined(_LIBCPP_VERSION) || defined(WIN32)
|
||||
// If we're compiling with libc++, create a namespace alias for tr1 that points to std.
|
||||
// Not particularly elegant, and largely should be filed under "hack", but it works for OS X with clang for now.
|
||||
namespace std {
|
@@ -21,3 +21,16 @@ diff -Naur orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler
|
||||
endif (MSVC)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
|
||||
diff -Naur orig/src/include/OpenImageIO/platform.h external_openimageio/src/include/OpenImageIO/platform.h
|
||||
--- orig/src/include/OpenImageIO/platform.h 2020-05-10 21:43:52 -0600
|
||||
+++ external_openimageio/src/include/OpenImageIO/platform.h 2020-05-13 17:04:36 -0600
|
||||
@@ -41,6 +41,9 @@
|
||||
# ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
+# ifndef NOGDI
|
||||
+# define NOGDI
|
||||
+# endif
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
|
@@ -1,6 +1,30 @@
|
||||
diff -ur openvdb-9.0.0/cmake/FindTBB.cmake openvdb/cmake/FindTBB.cmake
|
||||
--- openvdb-9.0.0/cmake/FindTBB.cmake 2021-10-30 03:55:40.000000000 +0100
|
||||
+++ openvdb/cmake/FindTBB.cmake 2022-03-31 11:33:15.592329750 +0100
|
||||
@@ -252,7 +252,8 @@
|
||||
set(_TBB_LIB_NAME "${_TBB_LIB_NAME}${TBB_DEBUG_SUFFIX}")
|
||||
endif()
|
||||
|
||||
- find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE} ${_TBB_LIB_NAME}
|
||||
+ find_library(Tbb_${COMPONENT}_LIBRARY_${BUILD_TYPE}
|
||||
+ NAMES ${_TBB_LIB_NAME} ${_TBB_LIB_NAME}_static
|
||||
${_FIND_TBB_ADDITIONAL_OPTIONS}
|
||||
PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
|
||||
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR} lib64 lib
|
||||
diff -Naur openvdb-8.0.0/openvdb/openvdb/CMakeLists.txt openvdb/openvdb/openvdb/CMakeLists.txt
|
||||
--- openvdb-8.0.0/openvdb/openvdb/CMakeLists.txt 2020-12-24 10:13:14 -0700
|
||||
+++ openvdb/openvdb/openvdb/CMakeLists.txt 2021-02-05 11:18:33 -0700
|
||||
@@ -107,7 +107,9 @@
|
||||
# http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html
|
||||
# https://github.com/boostorg/boost_install/commit/160c7cb2b2c720e74463865ef0454d4c4cd9ae7c
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
- set(Boost_USE_STATIC_LIBS OFF)
|
||||
+ if(NOT WIN32) # blender links boost statically on windows
|
||||
+ set(Boost_USE_STATIC_LIBS OFF)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS iostreams system)
|
||||
@@ -146,6 +148,7 @@
|
||||
Boost::disable_autolinking # add -DBOOST_ALL_NO_LIB
|
||||
)
|
||||
@@ -75,40 +99,321 @@ diff -Naur openvdb-8.0.0/openvdb/openvdb/version.rc.in openvdb/openvdb/openvdb/v
|
||||
+
|
||||
+ END
|
||||
+END
|
||||
diff -Naur orig/openvdb/openvdb/tree/ValueAccessor.h openvdb/openvdb/openvdb/tree/ValueAccessor.h
|
||||
--- orig/openvdb/openvdb/tree/ValueAccessor.h 2022-11-02 13:58:26 -0600
|
||||
+++ openvdb/openvdb/openvdb/tree/ValueAccessor.h 2022-11-02 18:55:09 -0600
|
||||
@@ -872,7 +872,10 @@
|
||||
using LeafNodeType = typename NodeType::LeafNodeType;
|
||||
using CoordLimits = std::numeric_limits<Int32>;
|
||||
|
||||
- static_assert(std::is_same<NodeType, LeafNodeType>::value);
|
||||
+ // Blender: Technically not an issue in OpenVDB, but USD 21.11 still builds
|
||||
+ // as C++14 which does not support terse asserts yet. Add a message to
|
||||
+ // explicitly select the C++14 supported static assert.
|
||||
+ static_assert(std::is_same<NodeType, LeafNodeType>::value, "cache item node type is not leaf node type");
|
||||
|
||||
CacheItem(TreeCacheT& parent)
|
||||
: mParent(&parent)
|
||||
diff --git a/nanovdb/nanovdb/NanoVDB.h b/nanovdb/nanovdb/NanoVDB.h
|
||||
index f7fc304..fde5c47 100644
|
||||
index cc2e54b77..703d2eabc 100644
|
||||
--- a/nanovdb/nanovdb/NanoVDB.h
|
||||
+++ b/nanovdb/nanovdb/NanoVDB.h
|
||||
@@ -1877,7 +1877,7 @@ __hostdev__ static inline uint32_t FindLowestOn(uint64_t v)
|
||||
{
|
||||
NANOVDB_ASSERT(v);
|
||||
#if (defined(__CUDA_ARCH__) || defined(__HIP__)) && defined(NANOVDB_USE_INTRINSICS)
|
||||
- return __ffsll(v);
|
||||
+ return __ffsll(static_cast<unsigned long long int>(v));
|
||||
#elif defined(_MSC_VER) && defined(NANOVDB_USE_INTRINSICS)
|
||||
unsigned long index;
|
||||
_BitScanForward64(&index, v);
|
||||
@@ -2592,7 +2592,7 @@ public:
|
||||
///
|
||||
/// @note This method is only defined for IndexGrid = NanoGrid<ValueIndex>
|
||||
template <typename T = BuildType>
|
||||
- __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, uint64_t>::type valueCount() const {return DataType::mData1;}
|
||||
+ __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, const uint64_t&>::type valueCount() const {return DataType::mData1;}
|
||||
@@ -161,8 +161,8 @@ typedef unsigned long long uint64_t;
|
||||
|
||||
#endif // __CUDACC_RTC__
|
||||
|
||||
-#ifdef __CUDACC__
|
||||
-// Only define __hostdev__ when using NVIDIA CUDA compiler
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
+// Only define __hostdev__ when using NVIDIA CUDA or HIP compiler
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#define __hostdev__
|
||||
@@ -611,7 +611,7 @@ struct Delta<double>
|
||||
/// Maximum floating-point values
|
||||
template<typename T>
|
||||
struct Maximum;
|
||||
-#ifdef __CUDA_ARCH__
|
||||
+#if defined(__CUDA_ARCH__) || defined(__HIP__)
|
||||
template<>
|
||||
struct Maximum<int>
|
||||
{
|
||||
@@ -1176,10 +1176,10 @@ using Vec3f = Vec3<float>;
|
||||
using Vec3i = Vec3<int>;
|
||||
|
||||
/// @brief Return a single precision floating-point vector of this coordinate
|
||||
-Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
+__hostdev__ inline Vec3f Coord::asVec3s() const { return Vec3f(float(mVec[0]), float(mVec[1]), float(mVec[2])); }
|
||||
|
||||
/// @brief Return a double precision floating-point vector of this coordinate
|
||||
-Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
+__hostdev__ inline Vec3d Coord::asVec3d() const { return Vec3d(double(mVec[0]), double(mVec[1]), double(mVec[2])); }
|
||||
|
||||
// ----------------------------> Vec4 <--------------------------------------
|
||||
|
||||
@@ -2042,7 +2042,7 @@ struct Map
|
||||
}; // Map
|
||||
|
||||
template<typename Mat4T>
|
||||
-void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
+__hostdev__ void Map::set(const Mat4T& mat, const Mat4T& invMat, double taper)
|
||||
{
|
||||
float * mf = mMatF, *vf = mVecF;
|
||||
float* mif = mInvMatF;
|
||||
@@ -2486,7 +2486,7 @@ class Grid : private GridData
|
||||
}; // Class Grid
|
||||
|
||||
template<typename TreeT>
|
||||
-int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
+__hostdev__ int Grid<TreeT>::findBlindDataForSemantic(GridBlindDataSemantic semantic) const
|
||||
{
|
||||
for (uint32_t i = 0, n = this->blindDataCount(); i < n; ++i)
|
||||
if (this->blindMetaData(i).mSemantic == semantic)
|
||||
@@ -2671,7 +2671,7 @@ class Tree : private TreeData<RootT::LEVEL>
|
||||
}; // Tree class
|
||||
|
||||
template<typename RootT>
|
||||
-void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
+__hostdev__ void Tree<RootT>::extrema(ValueType& min, ValueType& max) const
|
||||
{
|
||||
min = this->root().minimum();
|
||||
max = this->root().maximum();
|
||||
@@ -3880,7 +3880,7 @@ class LeafNode : private LeafData<BuildT, CoordT, MaskT, Log2Dim>
|
||||
}; // LeafNode class
|
||||
|
||||
template<typename ValueT, typename CoordT, template<uint32_t> class MaskT, uint32_t LOG2DIM>
|
||||
-inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
+__hostdev__ inline void LeafNode<ValueT, CoordT, MaskT, LOG2DIM>::updateBBox()
|
||||
{
|
||||
static_assert(LOG2DIM == 3, "LeafNode::updateBBox: only supports LOGDIM = 3!");
|
||||
if (!this->isActive()) return;
|
||||
diff --git a/nanovdb/nanovdb/util/SampleFromVoxels.h b/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
index 852123dac..e779d66cf 100644
|
||||
--- a/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
+++ b/nanovdb/nanovdb/util/SampleFromVoxels.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#define NANOVDB_SAMPLE_FROM_VOXELS_H_HAS_BEEN_INCLUDED
|
||||
|
||||
// Only define __hostdev__ when compiling as NVIDIA CUDA
|
||||
-#ifdef __CUDACC__
|
||||
+#if defined(__CUDACC__) || defined(__HIP__)
|
||||
#define __hostdev__ __host__ __device__
|
||||
#else
|
||||
#include <cmath> // for floor
|
||||
@@ -136,7 +136,7 @@ class SampleFromVoxels<TreeOrAccT, 0, false>
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
const CoordT ijk = Round<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -147,7 +147,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()(const CoordT& ijk) const
|
||||
{
|
||||
if (ijk != mPos) {
|
||||
mPos = ijk;
|
||||
@@ -158,7 +158,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, true>::operator()
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 0, false>::operator()(const Vec3T& xyz) const
|
||||
{
|
||||
return mAcc.getValue(Round<CoordT>(xyz));
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class TrilinearSampler
|
||||
}; // TrilinearSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
+__hostdev__ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) const
|
||||
{
|
||||
v[0][0][0] = mAcc.getValue(ijk); // i, j, k
|
||||
|
||||
@@ -224,7 +224,7 @@ void TrilinearSampler<TreeOrAccT>::stencil(CoordT& ijk, ValueT (&v)[2][2][2]) co
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
#if 0
|
||||
auto lerp = [](ValueT a, ValueT b, ValueT w){ return fma(w, b-a, a); };// = w*(b-a) + a
|
||||
@@ -239,7 +239,7 @@ typename TreeOrAccT::ValueType TrilinearSampler<TreeOrAccT>::sample(const Vec3T<
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(const Vec3T<RealT> &uvw, const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::gradient requires a floating-point type");
|
||||
#if 0
|
||||
@@ -270,7 +270,7 @@ Vec3T<typename TreeOrAccT::ValueType> TrilinearSampler<TreeOrAccT>::gradient(con
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
+__hostdev__ bool TrilinearSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[2][2][2])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -363,21 +363,21 @@ class SampleFromVoxels<TreeOrAccT, 1, true> : public TrilinearSampler<TreeOrAccT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[0][0][0] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, true>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::gradient(xyz, mVal);
|
||||
@@ -393,7 +393,7 @@ __hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, true>::zeroCrossing(Vec3T<RealT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -406,7 +406,7 @@ void SampleFromVoxels<TreeOrAccT, 1, true>::cache(Vec3T<RealT>& xyz) const
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -418,7 +418,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
auto lerp = [](ValueT a, ValueT b, RealT w) { return a + ValueT(w) * (b - a); };
|
||||
|
||||
@@ -463,7 +463,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 1, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, false>::gradient(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -473,7 +473,7 @@ inline Vec3T<typename TreeOrAccT::ValueType> SampleFromVoxels<TreeOrAccT, 1, fal
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 1, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[2][2][2];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -510,7 +510,7 @@ class TriquadraticSampler
|
||||
}; // TriquadraticSamplerBase
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
+__hostdev__ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][3][3]) const
|
||||
{
|
||||
CoordT p(ijk[0] - 1, 0, 0);
|
||||
for (int dx = 0; dx < 3; ++dx, ++p[0]) {
|
||||
@@ -526,7 +526,7 @@ void TriquadraticSampler<TreeOrAccT>::stencil(const CoordT &ijk, ValueT (&v)[3][
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec3T<RealT> &uvw, const ValueT (&v)[3][3][3])
|
||||
{
|
||||
auto kernel = [](const ValueT* value, double weight)->ValueT {
|
||||
return weight * (weight * (0.5f * (value[0] + value[2]) - value[1]) +
|
||||
@@ -545,7 +545,7 @@ typename TreeOrAccT::ValueType TriquadraticSampler<TreeOrAccT>::sample(const Vec
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
+__hostdev__ bool TriquadraticSampler<TreeOrAccT>::zeroCrossing(const ValueT (&v)[3][3][3])
|
||||
{
|
||||
static_assert(is_floating_point<ValueT>::value, "TrilinearSampler::zeroCrossing requires a floating-point type");
|
||||
const bool less = v[0][0][0] < ValueT(0);
|
||||
@@ -624,14 +624,14 @@ class SampleFromVoxels<TreeOrAccT, 2, true> : public TriquadraticSampler<TreeOrA
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mVal);
|
||||
}
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, true>::operator()(const CoordT &ijk) const
|
||||
{
|
||||
return ijk == mPos ? mVal[1][1][1] : BaseT::mAcc.getValue(ijk);
|
||||
}
|
||||
@@ -646,7 +646,7 @@ __hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, true>::zeroCrossing(Vec3T<RealT
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
@@ -657,7 +657,7 @@ void SampleFromVoxels<TreeOrAccT, 2, true>::cache(Vec3T<RealT>& xyz) const
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -667,7 +667,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 2, false>::operator(
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ bool SampleFromVoxels<TreeOrAccT, 2, false>::zeroCrossing(Vec3T<RealT> xyz) const
|
||||
{
|
||||
ValueT val[3][3][3];
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
@@ -710,7 +710,7 @@ class TricubicSampler
|
||||
}; // TricubicSampler
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
-void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
+__hostdev__ void TricubicSampler<TreeOrAccT>::stencil(const CoordT& ijk, ValueT (&C)[64]) const
|
||||
{
|
||||
auto fetch = [&](int i, int j, int k) -> ValueT& { return C[((i + 1) << 4) + ((j + 1) << 2) + k + 1]; };
|
||||
|
||||
@@ -929,7 +929,7 @@ class SampleFromVoxels<TreeOrAccT, 3, true> : public TricubicSampler<TreeOrAccT>
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
+__hostdev__ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()(Vec3T<RealT> xyz) const
|
||||
{
|
||||
this->cache(xyz);
|
||||
return BaseT::sample(xyz, mC);
|
||||
@@ -937,7 +937,7 @@ typename TreeOrAccT::ValueType SampleFromVoxels<TreeOrAccT, 3, true>::operator()
|
||||
|
||||
template<typename TreeOrAccT>
|
||||
template<typename RealT, template<typename...> class Vec3T>
|
||||
-void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
+__hostdev__ void SampleFromVoxels<TreeOrAccT, 3, true>::cache(Vec3T<RealT>& xyz) const
|
||||
{
|
||||
CoordT ijk = Floor<CoordT>(xyz);
|
||||
if (ijk != mPos) {
|
||||
|
||||
/// @brief Return a const reference to the tree
|
||||
__hostdev__ const TreeT& tree() const { return *reinterpret_cast<const TreeT*>(this->treePtr()); }
|
||||
|
@@ -1,8 +1,7 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d527232..5ad6eaa 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -99,6 +99,11 @@ set (OSL_PTX_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/ptx"
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/CMakeLists.txt external_osl/CMakeLists.txt
|
||||
--- OpenShadingLanguage-1.12.6.2/CMakeLists.txt 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/CMakeLists.txt 2022-10-15 14:49:26 -0600
|
||||
@@ -101,6 +101,11 @@
|
||||
CACHE STRING "Directory where OptiX PTX files will be installed")
|
||||
set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library naming postfix for Debug builds (e.g., '_debug')")
|
||||
|
||||
@@ -14,11 +13,10 @@ index d527232..5ad6eaa 100644
|
||||
|
||||
set (OSL_NO_DEFAULT_TEXTURESYSTEM OFF CACHE BOOL "Do not use create a raw OIIO::TextureSystem")
|
||||
if (OSL_NO_DEFAULT_TEXTURESYSTEM)
|
||||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
|
||||
index a7e098b..dad11d0 100644
|
||||
--- a/src/cmake/externalpackages.cmake
|
||||
+++ b/src/cmake/externalpackages.cmake
|
||||
@@ -77,6 +77,7 @@ link_directories ("${Boost_LIBRARY_DIRS}")
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/cmake/externalpackages.cmake external_osl/src/cmake/externalpackages.cmake
|
||||
--- OpenShadingLanguage-1.12.6.2/src/cmake/externalpackages.cmake 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/cmake/externalpackages.cmake 2022-10-15 14:49:26 -0600
|
||||
@@ -77,6 +77,7 @@
|
||||
|
||||
|
||||
checked_find_package (ZLIB REQUIRED) # Needed by several packages
|
||||
@@ -26,10 +24,30 @@ index a7e098b..dad11d0 100644
|
||||
|
||||
# IlmBase & OpenEXR
|
||||
checked_find_package (OpenEXR REQUIRED
|
||||
diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp
|
||||
index 8c2e77b..211b8a7 100644
|
||||
--- a/src/liboslcomp/oslcomp.cpp
|
||||
+++ b/src/liboslcomp/oslcomp.cpp
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/include/OSL/llvm_util.h external_osl/src/include/OSL/llvm_util.h
|
||||
--- OpenShadingLanguage-1.12.6.2/src/include/OSL/llvm_util.h 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/include/OSL/llvm_util.h 2022-10-15 15:37:24 -0600
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
+#define OSL_HAS_BLENDER_CLEANUP_FIX
|
||||
+
|
||||
#ifdef LLVM_NAMESPACE
|
||||
namespace llvm = LLVM_NAMESPACE;
|
||||
#endif
|
||||
@@ -455,7 +457,7 @@
|
||||
llvm::BasicBlock* masked_return_block() const;
|
||||
|
||||
bool is_masking_required() const { return m_is_masking_required; }
|
||||
-
|
||||
+ static void Cleanup ();
|
||||
struct ScopedMasking {
|
||||
ScopedMasking() {}
|
||||
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslcomp/oslcomp.cpp external_osl/src/liboslcomp/oslcomp.cpp
|
||||
--- OpenShadingLanguage-1.12.6.2/src/liboslcomp/oslcomp.cpp 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/liboslcomp/oslcomp.cpp 2022-10-15 14:49:26 -0600
|
||||
@@ -21,6 +21,13 @@
|
||||
#if !defined(__STDC_CONSTANT_MACROS)
|
||||
# define __STDC_CONSTANT_MACROS 1
|
||||
@@ -44,34 +62,50 @@ index 8c2e77b..211b8a7 100644
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
#include <clang/Frontend/TextDiagnosticPrinter.h>
|
||||
diff --git a/src/liboslexec/llvm_instance.cpp b/src/liboslexec/llvm_instance.cpp
|
||||
index 8f52546..8c2d0c7 100644
|
||||
--- a/src/liboslexec/llvm_instance.cpp
|
||||
+++ b/src/liboslexec/llvm_instance.cpp
|
||||
@@ -1363,6 +1363,10 @@ BackendLLVM::run()
|
||||
#ifdef OSL_LLVM_NO_BITCODE
|
||||
OSL_ASSERT(!use_rs_bitcode());
|
||||
ll.module(ll.new_module("llvm_ops"));
|
||||
+ if (use_optix()) {
|
||||
+ ll.module()->setDataLayout("e-i64:64-i128:128-v16:16-v32:32-n16:32:64");
|
||||
+ ll.module()->setTargetTriple("nvptx64-nvidia-cuda");
|
||||
+ }
|
||||
#else
|
||||
if (!use_optix()) {
|
||||
if (use_rs_bitcode()) {
|
||||
diff --git a/src/liboslexec/shadingsys.cpp b/src/liboslexec/shadingsys.cpp
|
||||
index 46e4529..8e86486 100644
|
||||
--- a/src/liboslexec/shadingsys.cpp
|
||||
+++ b/src/liboslexec/shadingsys.cpp
|
||||
@@ -2121,6 +2121,11 @@ ShadingSystemImpl::getattribute(ShaderGroup* group, string_view name,
|
||||
return true;
|
||||
diff -Naur OpenShadingLanguage-1.12.6.2/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
|
||||
--- OpenShadingLanguage-1.12.6.2/src/liboslexec/llvm_util.cpp 2022-09-30 17:43:53 -0600
|
||||
+++ external_osl/src/liboslexec/llvm_util.cpp 2022-10-15 15:53:11 -0600
|
||||
@@ -116,8 +116,6 @@
|
||||
return { A.data(), size_t(A.size()) };
|
||||
}
|
||||
|
||||
+ if (name == "groupdata_size" && type == TypeDesc::TypeInt) {
|
||||
+ *(int*)val = (int)group->m_llvm_groupdata_size;
|
||||
+ return true;
|
||||
+ }
|
||||
-
|
||||
-
|
||||
namespace pvt {
|
||||
|
||||
typedef llvm::SectionMemoryManager LLVMMemoryManager;
|
||||
@@ -182,6 +180,13 @@
|
||||
++jit_mem_hold_users;
|
||||
}
|
||||
|
||||
+void
|
||||
+LLVM_Util::Cleanup()
|
||||
+{
|
||||
+ if (jitmm_hold)
|
||||
+ jitmm_hold->clear();
|
||||
+}
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
LLVM_Util::ScopedJitMemoryUser::~ScopedJitMemoryUser()
|
||||
{
|
||||
diff --git a/src/include/OSL/mask.h b/src/include/OSL/mask.h
|
||||
index 24197af..b9275f6 100644
|
||||
--- a/src/include/OSL/mask.h
|
||||
+++ b/src/include/OSL/mask.h
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
-#include <immintrin.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include <OSL/oslconfig.h>
|
||||
@@ -23,6 +22,8 @@ using std::countr_zero;
|
||||
|
||||
#elif OSL_INTEL_CLASSIC_COMPILER_VERSION
|
||||
|
||||
+#include <immintrin.h>
|
||||
+
|
||||
OSL_FORCEINLINE int popcount(uint32_t x) noexcept { return _mm_popcnt_u32(x);}
|
||||
OSL_FORCEINLINE int popcount(uint64_t x) noexcept { return _mm_popcnt_u64(x); }
|
||||
OSL_FORCEINLINE int countr_zero(uint32_t x) noexcept { return _bit_scan_forward(x); }
|
||||
|
@@ -36,39 +36,3 @@ index a97a755..07ce853 100644
|
||||
if (self.compiler.find_library_file(self.lib_dirs, lib_name)):
|
||||
ffi_lib = lib_name
|
||||
break
|
||||
--- a/Modules/posixmodule.c 2022-12-09 21:44:03
|
||||
+++ b/Modules/posixmodule.c 2022-12-09 21:39:46
|
||||
@@ -10564,10 +10564,15 @@
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#ifdef HAVE_MKFIFOAT
|
||||
if (dir_fd != DEFAULT_DIR_FD) {
|
||||
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||
+// https://github.com/python/cpython/issues/97897
|
||||
+#ifndef __APPLE__
|
||||
if (HAVE_MKFIFOAT_RUNTIME) {
|
||||
result = mkfifoat(dir_fd, path->narrow, mode);
|
||||
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
- } else {
|
||||
mkfifoat_unavailable = 1;
|
||||
result = 0;
|
||||
}
|
||||
@@ -10638,10 +10633,15 @@
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#ifdef HAVE_MKNODAT
|
||||
if (dir_fd != DEFAULT_DIR_FD) {
|
||||
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||
+// https://github.com/python/cpython/issues/97897
|
||||
+#ifndef __APPLE__
|
||||
if (HAVE_MKNODAT_RUNTIME) {
|
||||
result = mknodat(dir_fd, path->narrow, mode, device);
|
||||
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
- } else {
|
||||
mknodat_unavailable = 1;
|
||||
result = 0;
|
||||
}
|
||||
|
@@ -1,22 +0,0 @@
|
||||
--- a/PCbuild/prepare_ssl.bat 2022-10-30 11:48:14 -0600
|
||||
+++ b/PCbuild/prepare_ssl.bat 2022-10-30 11:53:16 -0600
|
||||
@@ -47,12 +47,13 @@
|
||||
if "%PERL%" == "" where perl > "%TEMP%\perl.loc" 2> nul && set /P PERL= <"%TEMP%\perl.loc" & del "%TEMP%\perl.loc"
|
||||
if "%PERL%" == "" (echo Cannot locate perl.exe on PATH or as PERL variable & exit /b 4)
|
||||
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32
|
||||
-if errorlevel 1 exit /b
|
||||
+REM Blender: we only need x64, ssl is kind of a long build, so just build what we need
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32
|
||||
+REM if errorlevel 1 exit /b
|
||||
%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=x64
|
||||
if errorlevel 1 exit /b
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM
|
||||
-if errorlevel 1 exit /b
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM64
|
||||
-if errorlevel 1 exit /b
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM
|
||||
+REM if errorlevel 1 exit /b
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM64
|
||||
+REM if errorlevel 1 exit /b
|
||||
|
@@ -30,19 +30,3 @@ diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c
|
||||
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
|
||||
if (Cocoa_IsWindowInFullscreenSpace(window)) {
|
||||
return SDL_FALSE;
|
||||
--- CMakeLists.txt 2022-12-09 20:40:00
|
||||
+++ CMakeLists.txt 2022-12-09 20:40:00
|
||||
@@ -526,6 +526,13 @@
|
||||
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
|
||||
endif()
|
||||
|
||||
+ # BLENDER: make libs compatible with older Xcode.
|
||||
+ # https://github.com/KhronosGroup/MoltenVK/issues/1756
|
||||
+ check_c_compiler_flag(-fno-objc-msgsend-selector-stubs HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
+ if(HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||
+ list(APPEND EXTRA_CFLAGS "-fno-objc-msgsend-selector-stubs")
|
||||
+ endif()
|
||||
+
|
||||
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
diff -Naur orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packages.cmake
|
||||
--- orig/cmake/defaults/Packages.cmake 2022-10-27 12:56:33 -0600
|
||||
+++ external_usd/cmake/defaults/Packages.cmake 2022-10-27 13:05:08 -0600
|
||||
@@ -129,7 +129,7 @@
|
||||
diff -x .git -ur usd.orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packages.cmake
|
||||
--- usd.orig/cmake/defaults/Packages.cmake 2019-10-24 22:39:53.000000000 +0200
|
||||
+++ external_usd/cmake/defaults/Packages.cmake 2019-11-28 13:00:33.185957483 +0100
|
||||
@@ -64,7 +64,7 @@
|
||||
endif()
|
||||
|
||||
# --TBB
|
||||
@@ -10,9 +10,10 @@ diff -Naur orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packag
|
||||
add_definitions(${TBB_DEFINITIONS})
|
||||
|
||||
# --math
|
||||
diff -Naur orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/defaults/msvcdefaults.cmake
|
||||
--- orig/cmake/defaults/msvcdefaults.cmake 2022-10-27 12:56:33 -0600
|
||||
+++ external_usd/cmake/defaults/msvcdefaults.cmake 2022-10-27 13:05:08 -0600
|
||||
|
||||
diff -Naur usd_orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/defaults/msvcdefaults.cmake
|
||||
--- usd_orig/cmake/defaults/msvcdefaults.cmake 2022-02-18 14:49:09 -0700
|
||||
+++ external_usd/cmake/defaults/msvcdefaults.cmake 2022-03-14 11:41:50 -0600
|
||||
@@ -120,9 +120,6 @@
|
||||
# for all translation units.
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /bigobj")
|
||||
@@ -23,10 +24,38 @@ diff -Naur orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/defaults/ms
|
||||
# Enable multiprocessor builds.
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /MP")
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Gm-")
|
||||
diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
--- orig/pxr/base/arch/timing.h 2022-10-27 12:56:34 -0600
|
||||
+++ external_usd/pxr/base/arch/timing.h 2022-10-27 13:05:08 -0600
|
||||
@@ -84,6 +84,10 @@
|
||||
|
||||
diff --git a/pxr/base/work/singularTask.h b/pxr/base/work/singularTask.h
|
||||
--- a/pxr/base/work/singularTask.h
|
||||
+++ b/pxr/base/work/singularTask.h
|
||||
@@ -120,7 +120,7 @@
|
||||
// case we go again to ensure the task can do whatever it
|
||||
// was awakened to do. Once we successfully take the count
|
||||
// to zero, we stop.
|
||||
- size_t old = count;
|
||||
+ std::size_t old = count;
|
||||
do { _fn(); } while (
|
||||
!count.compare_exchange_strong(old, 0));
|
||||
});
|
||||
|
||||
diff --git a/pxr/usd/sdr/shaderMetadataHelpers.h b/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
--- a/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
+++ b/pxr/usd/sdr/shaderMetadataHelpers.h
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "pxr/base/tf/token.h"
|
||||
#include "pxr/usd/sdr/declare.h"
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
/// \namespace ShaderMetadataHelpers
|
||||
|
||||
diff --git a/pxr/base/arch/timing.h b/pxr/base/arch/timing.h
|
||||
index 517561f..fda5a1f 100644
|
||||
--- a/pxr/base/arch/timing.h
|
||||
+++ b/pxr/base/arch/timing.h
|
||||
@@ -91,6 +91,10 @@ ArchGetTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStartTickTime()
|
||||
{
|
||||
@@ -37,7 +66,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -116,6 +120,7 @@
|
||||
@@ -123,6 +127,7 @@ ArchGetStartTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
@@ -45,7 +74,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
}
|
||||
|
||||
/// Get a "stop" tick time for measuring an interval of time. See
|
||||
@@ -125,6 +130,10 @@
|
||||
@@ -132,6 +137,10 @@ ArchGetStartTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStopTickTime()
|
||||
{
|
||||
@@ -56,7 +85,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -155,11 +164,11 @@
|
||||
@@ -162,11 +171,11 @@ ArchGetStopTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
@@ -71,46 +100,3 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
|
||||
/// A simple timer class for measuring an interval of time using the
|
||||
/// ArchTickTimer facilities.
|
||||
diff -Naur orig/pxr/imaging/hioOpenVDB/CMakeLists.txt external_usd/pxr/imaging/hioOpenVDB/CMakeLists.txt
|
||||
--- orig/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-10-27 12:56:35 -0600
|
||||
+++ external_usd/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-10-27 13:05:08 -0600
|
||||
@@ -20,6 +20,12 @@
|
||||
LIST(APPEND __VDB_IMATH_LIBS ${OPENEXR_Half_LIBRARY})
|
||||
endif()
|
||||
|
||||
+if (WIN32)
|
||||
+ # OpenVDB uses constants from <cmath> that aren't available on
|
||||
+ # Windows unless this is defined.
|
||||
+ add_definitions(-D_USE_MATH_DEFINES)
|
||||
+endif()
|
||||
+
|
||||
pxr_library(hioOpenVDB
|
||||
LIBRARIES
|
||||
ar
|
||||
diff -Naur orig/pxr/usdImaging/CMakeLists.txt external_usd/pxr/usdImaging/CMakeLists.txt
|
||||
--- orig/pxr/usdImaging/CMakeLists.txt 2022-10-27 12:56:37 -0600
|
||||
+++ external_usd/pxr/usdImaging/CMakeLists.txt 2022-10-27 13:05:08 -0600
|
||||
@@ -7,7 +7,7 @@
|
||||
usdVolImaging
|
||||
usdAppUtils
|
||||
usdviewq
|
||||
- bin
|
||||
+# bin
|
||||
plugin
|
||||
)
|
||||
|
||||
diff -Naur orig/cmake/macros/Private.cmake external_usd/cmake/macros/Private.cmake
|
||||
--- orig/cmake/macros/Private.cmake 2022-02-18 14:49:09 -0700
|
||||
+++ external_usd/cmake/macros/Private.cmake 2022-08-05 10:42:03 -0600
|
||||
@@ -900,8 +900,10 @@
|
||||
return()
|
||||
endif()
|
||||
|
||||
- if (WIN32 AND PXR_USE_DEBUG_PYTHON)
|
||||
+ if (WIN32 AND PXR_USE_DEBUG_PYTHON AND NOT CMAKE_DEBUG_POSTFIX)
|
||||
# On Windows when compiling with debug python the library must be named with _d.
|
||||
+ # Blender: but this can be skipped if CMAKE_DEBUG_POSTFIX is set, it knows
|
||||
+ # what it is doing and we don't want libraries ending in _d_d.pyd
|
||||
set(LIBRARY_NAME "_${NAME}_d")
|
||||
else()
|
||||
set(LIBRARY_NAME "_${NAME}")
|
||||
|
11
build_files/build_environment/patches/wayland.diff
Normal file
11
build_files/build_environment/patches/wayland.diff
Normal file
@@ -0,0 +1,11 @@
|
||||
--- meson.build.orig 2022-06-30 22:59:11.000000000 +0100
|
||||
+++ meson.build 2022-09-27 13:21:26.428517668 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
'wayland', 'c',
|
||||
version: '1.21.0',
|
||||
license: 'MIT',
|
||||
- meson_version: '>= 0.56.0',
|
||||
+ meson_version: '>= 0.55.1',
|
||||
default_options: [
|
||||
'warning_level=2',
|
||||
'buildtype=debugoptimized',
|
@@ -103,19 +103,15 @@ if %ERRORLEVEL% NEQ 0 (
|
||||
)
|
||||
|
||||
set StatusFile=%BUILD_DIR%\%1_%2.log
|
||||
set original_path=%path%
|
||||
set oiio_paths=%Staging%\%BuildDir%%ARCH%R\Release\openimageio\bin;%Staging%\%BuildDir%%ARCH%D\Debug\openimageio\bin
|
||||
set boost_paths=%Staging%\%BuildDir%%ARCH%R\Release\boost\lib;%Staging%\%BuildDir%%ARCH%D\Debug\boost\lib
|
||||
set openexr_paths=%Staging%\%BuildDir%%ARCH%R\Release\openexr\bin;%Staging%\%BuildDir%%ARCH%D\Debug\openexr\bin
|
||||
set imath_paths=%Staging%\%BuildDir%%ARCH%R\Release\imath\bin;%Staging%\%BuildDir%%ARCH%D\Debug\imath\bin
|
||||
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%path%;%boost_paths%;%oiio_paths%;%openexr_paths%;%imath_paths%
|
||||
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%path%
|
||||
mkdir %STAGING%\%BuildDir%%ARCH%R
|
||||
cd %Staging%\%BuildDir%%ARCH%R
|
||||
echo %DATE% %TIME% : Start > %StatusFile%
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
|
||||
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
|
||||
msbuild /m:1 "ll.vcxproj" /p:Configuration=Release /fl /flp:logfile=BlenderDeps_llvm.log;Verbosity=normal
|
||||
msbuild /m:1 "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
|
||||
echo %DATE% %TIME% : Release Build done >> %StatusFile%
|
||||
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
|
||||
)
|
||||
@@ -127,7 +123,8 @@ cd %Staging%\%BuildDir%%ARCH%D
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
|
||||
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
|
||||
msbuild /m:1 "ll.vcxproj" /p:Configuration=Debug /fl /flp:logfile=BlenderDeps_llvm.log;;Verbosity=normal
|
||||
msbuild /m:1 "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
|
||||
echo %DATE% %TIME% : Debug Build done >> %StatusFile%
|
||||
cmake --build . --target Harvest_Debug_Results> Harvest_Debug.txt
|
||||
)
|
||||
@@ -135,5 +132,4 @@ echo %DATE% %TIME% : Debug Harvest done >> %StatusFile%
|
||||
cd %BUILD_DIR%
|
||||
|
||||
:exit
|
||||
set path=%original_path%
|
||||
Echo .
|
||||
|
@@ -4,9 +4,10 @@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
||||
|
||||
message(STATUS "Building in Rocky 8 Linux 64bit environment")
|
||||
message(STATUS "Building in CentOS 7 64bit environment")
|
||||
|
||||
set(LIBDIR_NAME "linux_x86_64_glibc_228")
|
||||
set(LIBDIR_NAME "linux_centos7_x86_64")
|
||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Linux-specific build options ########
|
||||
# Options which are specific to Linux-only platforms
|
||||
@@ -27,4 +28,4 @@ set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRI
|
||||
# Platform specific configuration, to ensure static linking against everything.
|
||||
|
||||
# Additional linking libraries
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -no-pie" CACHE STRING "" FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -static-libstdc++ -no-pie" CACHE STRING "" FORCE)
|
||||
|
@@ -24,7 +24,6 @@ SET(_opencolorio_FIND_COMPONENTS
|
||||
yaml-cpp
|
||||
expat
|
||||
pystring
|
||||
minizip
|
||||
)
|
||||
|
||||
SET(_opencolorio_SEARCH_DIRS
|
||||
|
@@ -13,7 +13,6 @@
|
||||
#
|
||||
# This module defines
|
||||
# PYTHON_VERSION
|
||||
# PYTHON_VERSION_NO_DOTS
|
||||
# PYTHON_INCLUDE_DIRS
|
||||
# PYTHON_INCLUDE_CONFIG_DIRS
|
||||
# PYTHON_LIBRARIES
|
||||
@@ -65,11 +64,11 @@ IF(DEFINED PYTHON_LIBPATH)
|
||||
SET(_IS_LIB_PATH_DEF ON)
|
||||
ENDIF()
|
||||
|
||||
STRING(REPLACE "." "" PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
||||
SET(_python_SEARCH_DIRS
|
||||
${PYTHON_ROOT_DIR}
|
||||
"$ENV{HOME}/py${PYTHON_VERSION_NO_DOTS}"
|
||||
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/lib/python-${PYTHON_VERSION}"
|
||||
)
|
||||
|
||||
@@ -212,6 +211,7 @@ IF(PYTHONLIBSUNIX_FOUND)
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
UNSET(_PYTHON_VERSION_NO_DOTS)
|
||||
UNSET(_PYTHON_ABI_FLAGS)
|
||||
UNSET(_python_SEARCH_DIRS)
|
||||
|
||||
|
@@ -59,9 +59,6 @@ ELSE()
|
||||
get_filename_component(USD_LIBRARY_DIR ${USD_LIBRARY} DIRECTORY)
|
||||
SET(USD_INCLUDE_DIRS ${USD_INCLUDE_DIR})
|
||||
set(USD_LIBRARIES ${USD_LIBRARY})
|
||||
IF(EXISTS ${USD_INCLUDE_DIR}/pxr/base/tf/pyModule.h)
|
||||
SET(USD_PYTHON_SUPPORT ON)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@@ -95,9 +95,6 @@ macro(BLENDER_SRC_GTEST_EX)
|
||||
set_tests_properties(${TARGET_NAME} PROPERTIES
|
||||
ENVIRONMENT LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
|
||||
)
|
||||
if(WIN32)
|
||||
set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
|
||||
endif()
|
||||
endif()
|
||||
if(WIN32)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES VS_GLOBAL_VcpkgEnabled "false")
|
||||
|
@@ -58,7 +58,6 @@ set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MATERIALX OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
@@ -63,7 +63,6 @@ set(WITH_QUADRIFLOW OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_USD OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_MATERIALX OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_WASAPI OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_XR_OPENXR OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
@@ -59,7 +59,6 @@ set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MATERIALX OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
@@ -422,9 +422,7 @@ function(blender_add_test_suite)
|
||||
--test-assets-dir "${CMAKE_SOURCE_DIR}/../lib/tests"
|
||||
--test-release-dir "${_test_release_dir}"
|
||||
)
|
||||
if(WIN32)
|
||||
set_tests_properties(${ARGS_SUITE_NAME} PROPERTIES ENVIRONMENT "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/;$ENV{PATH}")
|
||||
endif()
|
||||
|
||||
unset(_test_release_dir)
|
||||
endfunction()
|
||||
|
||||
@@ -535,7 +533,7 @@ function(setup_platform_linker_flags
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
if(target_type STREQUAL "EXECUTABLE")
|
||||
if (target_type STREQUAL "EXECUTABLE")
|
||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS_EXECUTABLE}")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -1259,88 +1257,3 @@ endmacro()
|
||||
macro(without_system_libs_end)
|
||||
unset(CMAKE_IGNORE_PATH)
|
||||
endmacro()
|
||||
|
||||
# Utility to gather and install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library_dir)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(_library_dir ${LIBDIR}/${library_dir})
|
||||
if(WIN32)
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.dll)
|
||||
elseif(APPLE)
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.dylib*)
|
||||
else()
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.so*)
|
||||
endif()
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARY_DIRS ${_library_dir})
|
||||
unset(_all_library_versions)
|
||||
unset(_library_dir)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(windows_install_shared_manifest)
|
||||
set(options OPTIONAL DEBUG RELEASE ALL)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs FILES)
|
||||
cmake_parse_arguments(WINDOWS_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
# If none of the options are set assume ALL.
|
||||
unset(WINDOWS_CONFIGURATIONS)
|
||||
if(NOT WINDOWS_INSTALL_ALL AND
|
||||
NOT WINDOWS_INSTALL_DEBUG AND
|
||||
NOT WINDOWS_INSTALL_RELEASE)
|
||||
set(WINDOWS_INSTALL_ALL TRUE)
|
||||
endif()
|
||||
# If all is set, turn both DEBUG and RELEASE on.
|
||||
if(WINDOWS_INSTALL_ALL)
|
||||
set(WINDOWS_INSTALL_DEBUG TRUE)
|
||||
set(WINDOWS_INSTALL_RELEASE TRUE)
|
||||
endif()
|
||||
if(WINDOWS_INSTALL_DEBUG)
|
||||
set(WINDOWS_CONFIGURATIONS "${WINDOWS_CONFIGURATIONS};Debug")
|
||||
list(APPEND WINDOWS_SHARED_MANIFEST_DEBUG ${WINDOWS_INSTALL_FILES})
|
||||
endif()
|
||||
if(WINDOWS_INSTALL_RELEASE)
|
||||
list(APPEND WINDOWS_SHARED_MANIFEST_RELEASE ${WINDOWS_INSTALL_FILES})
|
||||
set(WINDOWS_CONFIGURATIONS "${WINDOWS_CONFIGURATIONS};Release;RelWithDebInfo;MinSizeRel")
|
||||
endif()
|
||||
install(FILES ${WINDOWS_INSTALL_FILES}
|
||||
CONFIGURATIONS ${WINDOWS_CONFIGURATIONS}
|
||||
DESTINATION "./blender.shared"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
macro(windows_generate_manifest)
|
||||
set(options)
|
||||
set(oneValueArgs OUTPUT NAME)
|
||||
set(multiValueArgs FILES)
|
||||
cmake_parse_arguments(WINDOWS_MANIFEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
set(MANIFEST_LIBS "")
|
||||
foreach(lib ${WINDOWS_MANIFEST_FILES})
|
||||
get_filename_component(filename ${lib} NAME)
|
||||
set(MANIFEST_LIBS "${MANIFEST_LIBS} <file name=\"${filename}\"/>\n")
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.manifest.in ${WINDOWS_MANIFEST_OUTPUT} @ONLY)
|
||||
endmacro()
|
||||
|
||||
macro(windows_generate_shared_manifest)
|
||||
windows_generate_manifest(
|
||||
FILES "${WINDOWS_SHARED_MANIFEST_DEBUG}"
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest"
|
||||
NAME "blender.shared"
|
||||
)
|
||||
windows_generate_manifest(
|
||||
FILES "${WINDOWS_SHARED_MANIFEST_RELEASE}"
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/Release/blender.shared.manifest"
|
||||
NAME "blender.shared"
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_BINARY_DIR}/Release/blender.shared.manifest
|
||||
DESTINATION "./blender.shared"
|
||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest
|
||||
DESTINATION "./blender.shared"
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
endmacro()
|
||||
|
@@ -21,6 +21,18 @@ function(print_found_status
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Utility to install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(_library_dir ${LIBDIR}/${library}/lib)
|
||||
file(GLOB _all_library_versions ${_library_dir}/*\.dylib*)
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARY_DIRS ${_library_dir})
|
||||
unset(_all_library_versions)
|
||||
unset(_library_dir)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# Find system provided libraries.
|
||||
|
||||
@@ -87,13 +99,6 @@ endif()
|
||||
if(WITH_USD)
|
||||
find_package(USD REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(usd/lib)
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
endif()
|
||||
add_bundled_libraries(materialx/lib)
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
find_package(MoltenVK REQUIRED)
|
||||
@@ -103,10 +108,9 @@ if(WITH_VULKAN_BACKEND)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan/macOS)
|
||||
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
||||
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/libvulkan.1.dylib)
|
||||
set(SHADERC_LIBRARY ${VULKAN_ROOT_DIR}/lib/libshaderc_combined.a)
|
||||
|
||||
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR} ${MOLTENVK_INCLUDE_DIRS})
|
||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${SHADERC_LIBRARY} ${MOLTENVK_LIBRARIES})
|
||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${MOLTENVK_LIBRARIES})
|
||||
else()
|
||||
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
||||
set(WITH_VULKAN_BACKEND OFF)
|
||||
@@ -116,7 +120,6 @@ endif()
|
||||
if(WITH_OPENSUBDIV)
|
||||
find_package(OpenSubdiv)
|
||||
endif()
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
find_package(SndFile)
|
||||
@@ -155,8 +158,6 @@ list(APPEND FREETYPE_LIBRARIES
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
find_package(OpenEXR)
|
||||
endif()
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||
@@ -254,17 +255,9 @@ if(WITH_BOOST)
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND _boost_FIND_COMPONENTS iostreams)
|
||||
endif()
|
||||
if(WITH_USD AND USD_PYTHON_SUPPORT)
|
||||
list(APPEND _boost_FIND_COMPONENTS python${PYTHON_VERSION_NO_DOTS})
|
||||
endif()
|
||||
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})
|
||||
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)
|
||||
|
||||
@@ -272,7 +265,6 @@ if(WITH_BOOST)
|
||||
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 !
|
||||
@@ -295,24 +287,18 @@ if(WITH_OPENIMAGEIO)
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||
endif()
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package(OpenColorIO 2.0.0 REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
find_library(BLOSC_LIBRARIES NAMES blosc HINTS ${LIBDIR}/openvdb/lib)
|
||||
if(BLOSC_LIBRARIES)
|
||||
print_found_status("Blosc" "${BLOSC_LIBRARIES}")
|
||||
list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES})
|
||||
else()
|
||||
unset(BLOSC_LIBRARIES CACHE)
|
||||
endif()
|
||||
set(OPENVDB_DEFINITIONS)
|
||||
endif()
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package(NanoVDB)
|
||||
@@ -361,7 +347,6 @@ endif()
|
||||
if(WITH_TBB)
|
||||
find_package(TBB REQUIRED)
|
||||
endif()
|
||||
add_bundled_libraries(tbb/lib)
|
||||
|
||||
if(WITH_POTRACE)
|
||||
find_package(Potrace REQUIRED)
|
||||
@@ -379,9 +364,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)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openmp/lib)
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK REQUIRED)
|
||||
@@ -495,12 +480,6 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
# different.
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
list(APPEND CMAKE_BUILD_RPATH ${PLATFORM_BUNDLED_LIBRARY_DIRS})
|
||||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD "DYLD_LIBRARY_PATH=\"${_library_paths};${DYLD_LIBRARY_PATH}\"")
|
||||
set(PLATFORM_ENV_INSTALL "DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/Blender.app/Contents/Resources/lib/;$DYLD_LIBRARY_PATH")
|
||||
unset(_library_paths)
|
||||
endif()
|
||||
|
||||
# Same as `CFBundleIdentifier` in Info.plist.
|
||||
|
@@ -3,40 +3,15 @@
|
||||
|
||||
# Auto update existing CMake caches for new libraries
|
||||
|
||||
# Clear cached variables whose name matches `pattern`.
|
||||
function(unset_cache_variables pattern)
|
||||
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||
foreach(_cache_variable ${_cache_variables})
|
||||
foreach (_cache_variable ${_cache_variables})
|
||||
if("${_cache_variable}" MATCHES "${pattern}")
|
||||
unset(${_cache_variable} CACHE)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Clear cached variables with values containing `contents`.
|
||||
function(unset_cached_varables_containting contents msg)
|
||||
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||
set(_found)
|
||||
set(_print_msg)
|
||||
foreach(_cache_variable ${_cache_variables})
|
||||
# Skip "_" prefixed variables, these are used for internal book-keeping,
|
||||
# not under user control.
|
||||
string(FIND "${_cache_variable}" "_" _found)
|
||||
if(NOT (_found EQUAL 0))
|
||||
string(FIND "${${_cache_variable}}" "${contents}" _found)
|
||||
if(NOT (_found EQUAL -1))
|
||||
if(_found)
|
||||
unset(${_cache_variable} CACHE)
|
||||
set(_print_msg ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
if(_print_msg)
|
||||
message(STATUS ${msg})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Detect update from 3.1 to 3.2 libs.
|
||||
if(UNIX AND
|
||||
DEFINED OPENEXR_VERSION AND
|
||||
@@ -69,32 +44,3 @@ if(UNIX AND DEFINED NANOVDB_INCLUDE_DIR)
|
||||
unset_cache_variables("^NANOVDB")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Detect update to 3.5 libs with shared libraries.
|
||||
if(UNIX AND
|
||||
DEFINED TBB_LIBRARY AND
|
||||
TBB_LIBRARY MATCHES "libtbb.a$" AND
|
||||
EXISTS ${LIBDIR}/usd/include/pxr/base/tf/pyModule.h)
|
||||
message(STATUS "Auto updating CMake configuration for Blender 3.5 libraries")
|
||||
unset_cache_variables("^BLOSC")
|
||||
unset_cache_variables("^BOOST")
|
||||
unset_cache_variables("^Boost")
|
||||
unset_cache_variables("^IMATH")
|
||||
unset_cache_variables("^OPENCOLORIO")
|
||||
unset_cache_variables("^OPENEXR")
|
||||
unset_cache_variables("^OPENIMAGEIO")
|
||||
unset_cache_variables("^OPENSUBDIV")
|
||||
unset_cache_variables("^OPENVDB")
|
||||
unset_cache_variables("^TBB")
|
||||
unset_cache_variables("^USD")
|
||||
endif()
|
||||
|
||||
if(UNIX AND (NOT APPLE) AND LIBDIR AND (EXISTS ${LIBDIR}))
|
||||
# Only search for the path if it's found on the system.
|
||||
set(_libdir_stale "/lib/linux_centos7_x86_64/")
|
||||
unset_cached_varables_containting(
|
||||
"${_libdir_stale}"
|
||||
"Auto clearing old ${_libdir_stale} paths from CMake configuration"
|
||||
)
|
||||
unset(_libdir_stale)
|
||||
endif()
|
||||
|
@@ -10,15 +10,16 @@ if(NOT DEFINED LIBDIR)
|
||||
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
||||
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||
|
||||
# Path to precompiled libraries with known glibc 2.28 ABI.
|
||||
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_x86_64_glibc_228)
|
||||
# Path to precompiled libraries with known CentOS 7 ABI.
|
||||
set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64)
|
||||
|
||||
# Choose the best suitable libraries.
|
||||
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
||||
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
||||
elseif(EXISTS ${LIBDIR_GLIBC228_ABI})
|
||||
set(LIBDIR ${LIBDIR_GLIBC228_ABI})
|
||||
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
|
||||
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
|
||||
set(WITH_CXX11_ABI OFF)
|
||||
if(WITH_MEM_JEMALLOC)
|
||||
# jemalloc provides malloc hooks.
|
||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
||||
@@ -29,7 +30,7 @@ if(NOT DEFINED LIBDIR)
|
||||
|
||||
# Avoid namespace pollustion.
|
||||
unset(LIBDIR_NATIVE_ABI)
|
||||
unset(LIBDIR_GLIBC228_ABI)
|
||||
unset(LIBDIR_CENTOS7_ABI)
|
||||
endif()
|
||||
|
||||
# Support restoring this value once pre-compiled libraries have been handled.
|
||||
@@ -67,7 +68,10 @@ if(EXISTS ${LIBDIR})
|
||||
set(Boost_NO_SYSTEM_PATHS ON)
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
set(CLANG_ROOT_DIR ${LIBDIR}/llvm)
|
||||
set(MaterialX_DIR ${LIBDIR}/materialx/lib/cmake/MaterialX)
|
||||
endif()
|
||||
|
||||
if(WITH_STATIC_LIBS)
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " -static-libstdc++")
|
||||
endif()
|
||||
|
||||
# Wrapper to prefer static libraries
|
||||
@@ -79,6 +83,15 @@ macro(find_package_wrapper)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Utility to install precompiled shared libraries.
|
||||
macro(add_bundled_libraries library)
|
||||
if(EXISTS ${LIBDIR})
|
||||
file(GLOB _all_library_versions ${LIBDIR}/${library}/lib/*\.so*)
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_all_library_versions})
|
||||
unset(_all_library_versions)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Precompiled Libraries
|
||||
#
|
||||
@@ -167,8 +180,6 @@ if(WITH_IMAGE_OPENEXR)
|
||||
find_package_wrapper(OpenEXR) # our own module
|
||||
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
||||
endif()
|
||||
add_bundled_libraries(openexr/lib)
|
||||
add_bundled_libraries(imath/lib)
|
||||
|
||||
if(WITH_IMAGE_OPENJPEG)
|
||||
find_package_wrapper(OpenJPEG)
|
||||
@@ -324,10 +335,14 @@ if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
find_package(OpenVDB)
|
||||
find_package_wrapper(OpenVDB)
|
||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||
|
||||
if(OPENVDB_FOUND)
|
||||
find_package_wrapper(Blosc)
|
||||
set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(openvdb/lib)
|
||||
|
||||
if(WITH_NANOVDB)
|
||||
find_package_wrapper(NanoVDB)
|
||||
@@ -347,19 +362,12 @@ if(WITH_USD)
|
||||
find_package_wrapper(USD)
|
||||
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
||||
endif()
|
||||
add_bundled_libraries(usd/lib)
|
||||
|
||||
if(WITH_MATERIALX)
|
||||
find_package_wrapper(MaterialX)
|
||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||
endif()
|
||||
add_bundled_libraries(materialx/lib)
|
||||
|
||||
if(WITH_BOOST)
|
||||
# uses in build instructions to override include and library variables
|
||||
if(NOT BOOST_CUSTOM)
|
||||
if(WITH_STATIC_LIBS)
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(__boost_packages filesystem regex thread date_time)
|
||||
@@ -375,9 +383,6 @@ if(WITH_BOOST)
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND __boost_packages iostreams)
|
||||
endif()
|
||||
if(WITH_USD AND USD_PYTHON_SUPPORT)
|
||||
list(APPEND __boost_packages python${PYTHON_VERSION_NO_DOTS})
|
||||
endif()
|
||||
list(APPEND __boost_packages system)
|
||||
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
|
||||
if(NOT Boost_FOUND)
|
||||
@@ -395,13 +400,8 @@ if(WITH_BOOST)
|
||||
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})
|
||||
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_LIBRARIES ${Boost_LIBRARIES})
|
||||
set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS})
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
|
||||
@@ -410,7 +410,6 @@ if(WITH_BOOST)
|
||||
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
add_bundled_libraries(boost/lib)
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
find_package_wrapper(PugiXML)
|
||||
@@ -432,6 +431,7 @@ if(WITH_OPENIMAGEIO)
|
||||
${ZLIB_LIBRARIES}
|
||||
${BOOST_LIBRARIES}
|
||||
)
|
||||
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENIMAGEIO_DEFINITIONS "")
|
||||
|
||||
if(WITH_IMAGE_TIFF)
|
||||
@@ -446,15 +446,16 @@ if(WITH_OPENIMAGEIO)
|
||||
|
||||
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
||||
endif()
|
||||
add_bundled_libraries(openimageio/lib)
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
find_package_wrapper(OpenColorIO 2.0.0)
|
||||
|
||||
set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
|
||||
set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
set(OPENCOLORIO_DEFINITIONS)
|
||||
|
||||
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
||||
endif()
|
||||
add_bundled_libraries(opencolorio/lib)
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.8.0 REQUIRED)
|
||||
@@ -489,20 +490,18 @@ if(WITH_LLVM)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV)
|
||||
find_package(OpenSubdiv)
|
||||
find_package_wrapper(OpenSubdiv)
|
||||
|
||||
set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES})
|
||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||
|
||||
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
||||
endif()
|
||||
add_bundled_libraries(opensubdiv/lib)
|
||||
|
||||
if(WITH_TBB)
|
||||
find_package_wrapper(TBB)
|
||||
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
||||
endif()
|
||||
add_bundled_libraries(tbb/lib)
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
find_package(XR_OpenXR_SDK)
|
||||
@@ -645,7 +644,8 @@ if(WITH_GHOST_WAYLAND)
|
||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||
else()
|
||||
# Rocky8 packages have too old a version, a newer version exist in the pre-compiled libraries.
|
||||
# CentOS 7 packages have too old a version, a newer version exist in the
|
||||
# precompiled libraries.
|
||||
find_path(WAYLAND_PROTOCOLS_DIR
|
||||
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||
PATH_SUFFIXES share/wayland-protocols
|
||||
@@ -970,9 +970,16 @@ if(WITH_COMPILER_CCACHE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Always link with libatomic if available, as it is required for data types
|
||||
# which don't have intrinsics.
|
||||
function(configure_atomic_lib_if_needed)
|
||||
# On some platforms certain atomic operations are not possible with assembly and/or intrinsics and
|
||||
# they are emulated in software with locks. For example, on armel there is no intrinsics to grant
|
||||
# 64 bit atomic operations and STL library uses libatomic to offload software emulation of atomics
|
||||
# to.
|
||||
# This function will check whether libatomic is required and if so will configure linker flags.
|
||||
# If atomic operations are possible without libatomic then linker flags are left as-is.
|
||||
function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
|
||||
# Source which is used to enforce situation when software emulation of atomics is required.
|
||||
# Assume that using 64bit integer gives a definitive answer (as in, if 64bit atomic operations
|
||||
# are possible using assembly/intrinsics 8, 16, and 32 bit operations will also be possible.
|
||||
set(_source
|
||||
"#include <atomic>
|
||||
#include <cstdint>
|
||||
@@ -983,12 +990,25 @@ function(configure_atomic_lib_if_needed)
|
||||
)
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC)
|
||||
|
||||
if(NOT ATOMIC_OPS_WITHOUT_LIBATOMIC)
|
||||
# Compilation of the test program has failed.
|
||||
# Try it again with -latomic to see if this is what is needed, or whether something else is
|
||||
# going on.
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES atomic)
|
||||
check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
if(ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE)
|
||||
else()
|
||||
# Atomic operations are required part of Blender and it is not possible to process forward.
|
||||
# We expect that either standard library or libatomic will make atomics to work. If both
|
||||
# cases has failed something fishy o na bigger scope is going on.
|
||||
message(FATAL_ERROR "Failed to detect required configuration for atomic operations")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -1005,10 +1025,4 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
||||
# and because the build and install folder may be different.
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
list(APPEND CMAKE_BUILD_RPATH $ORIGIN/lib ${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib)
|
||||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths};${LD_LIBRARY_PATH}\"")
|
||||
set(PLATFORM_ENV_INSTALL "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH")
|
||||
unset(_library_paths)
|
||||
endif()
|
||||
|
@@ -83,7 +83,7 @@ string(APPEND CMAKE_MODULE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099")
|
||||
list(APPEND PLATFORM_LINKLIBS
|
||||
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
|
||||
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
|
||||
pathcch Shcore Dwmapi Crypt32
|
||||
pathcch Shcore Dwmapi
|
||||
)
|
||||
|
||||
if(WITH_INPUT_IME)
|
||||
@@ -110,41 +110,7 @@ remove_cc_flag("/GR")
|
||||
|
||||
# Make the Windows 8.1 API available for use.
|
||||
add_definitions(-D_WIN32_WINNT=0x603)
|
||||
|
||||
# First generate the manifest for tests since it will not need the dependency on the CRT.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
|
||||
|
||||
if(WITH_WINDOWS_BUNDLE_CRT)
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
||||
# redirects for this dll, for details see T88813.
|
||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||
string(FIND ${lib} "ucrtbase" pos)
|
||||
if(NOT pos EQUAL -1)
|
||||
list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
|
||||
install(FILES ${lib} DESTINATION . COMPONENT Libraries)
|
||||
endif()
|
||||
endforeach()
|
||||
# Install the CRT to the blender.crt Sub folder.
|
||||
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
|
||||
|
||||
windows_generate_manifest(
|
||||
FILES "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}"
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/blender.crt.manifest"
|
||||
NAME "blender.crt"
|
||||
)
|
||||
|
||||
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
|
||||
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
endif()
|
||||
set(BUNDLECRT "${BUNDLECRT}<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.shared\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest @ONLY)
|
||||
|
||||
|
||||
include(build_files/cmake/platform/platform_win32_bundle_crt.cmake)
|
||||
remove_cc_flag("/MDd" "/MD" "/Zi")
|
||||
|
||||
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||
@@ -285,11 +251,6 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio.+" AND WITH_CLANG_TIDY)
|
||||
set(VS_CLANG_TIDY ON)
|
||||
endif()
|
||||
|
||||
# To support building against both 3.4 and 3.5 lib folders, disable materialX if it is not found
|
||||
set(MATERIALX_LIB_FOLDER_EXISTS EXISTS ${LIBDIR}/materialx)
|
||||
set_and_warn_library_found("MaterialX" MATERIALX_LIB_FOLDER_EXISTS WITH_MATERIALX)
|
||||
unset(MATERIALX_LIB_FOLDER_EXISTS)
|
||||
|
||||
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
||||
# that we have very little control over
|
||||
if(NOT MSVC_CLANG AND # Available with MSVC 15.7+ but not for CLANG.
|
||||
@@ -446,12 +407,9 @@ if(WITH_IMAGE_OPENEXR)
|
||||
set(IMATH_INCLUDE_DIR ${IMATH}/include)
|
||||
set(IMATH_INCLUDE_DIRS ${IMATH_INCLUDE_DIR} ${IMATH}/include/Imath)
|
||||
set(IMATH_LIBPATH ${IMATH}/lib)
|
||||
if(EXISTS ${IMATH_LIBPATH}/Imath_s.lib)
|
||||
set(IMATH_POSTFIX _s)
|
||||
endif()
|
||||
set(IMATH_LIBRARIES
|
||||
optimized ${IMATH_LIBPATH}/Imath${IMATH_POSTFIX}.lib
|
||||
debug ${IMATH_LIBPATH}/Imath${IMATH_POSTFIX}_d.lib
|
||||
optimized ${IMATH_LIBPATH}/Imath_s.lib
|
||||
debug ${IMATH_LIBPATH}/Imath_s_d.lib
|
||||
)
|
||||
endif()
|
||||
set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)
|
||||
@@ -463,24 +421,36 @@ if(WITH_IMAGE_OPENEXR)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${IMATH_INCLUDE_DIRS} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
# Check if the blender 3.3 lib static library eixts
|
||||
# if not assume this is a 3.4+ dynamic version.
|
||||
# Check if the 3.x library name exists
|
||||
# if not assume this is a 2.x library folder
|
||||
if(EXISTS "${OPENEXR_LIBPATH}/OpenEXR_s.lib")
|
||||
set(OPENEXR_POSTFIX _s)
|
||||
endif()
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex${OPENEXR_POSTFIX}.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread${OPENEXR_POSTFIX}.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXR${OPENEXR_POSTFIX}.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXRCore${OPENEXR_POSTFIX}.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXRUtil${OPENEXR_POSTFIX}.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex${OPENEXR_POSTFIX}_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread${OPENEXR_POSTFIX}_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXR${OPENEXR_POSTFIX}_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXRCore${OPENEXR_POSTFIX}_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXRUtil${OPENEXR_POSTFIX}_d.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Iex_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXR_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXRCore_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/OpenEXRUtil_s.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXR_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXRCore_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/OpenEXRUtil_s_d.lib
|
||||
${IMATH_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
set(OPENEXR_LIBRARIES
|
||||
optimized ${OPENEXR_LIBPATH}/Iex_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Half_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmImf_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/Imath_s.lib
|
||||
optimized ${OPENEXR_LIBPATH}/IlmThread_s.lib
|
||||
debug ${OPENEXR_LIBPATH}/Iex_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Half_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmImf_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/Imath_s_d.lib
|
||||
debug ${OPENEXR_LIBPATH}/IlmThread_s_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -550,47 +520,38 @@ if(WITH_BOOST)
|
||||
if(NOT BOOST_VERSION)
|
||||
message(FATAL_ERROR "Unable to determine Boost version")
|
||||
endif()
|
||||
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}")
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gyd-x64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "")
|
||||
# This is file new in 3.4 if it does not exist, assume we are building against 3.3 libs
|
||||
set(BOOST_34_TRIGGER_FILE ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_DEBUG_POSTFIX}.lib)
|
||||
if(NOT EXISTS ${BOOST_34_TRIGGER_FILE})
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gd-x64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "lib")
|
||||
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gd-x64-${BOOST_VERSION}.lib")
|
||||
if(NOT EXISTS ${BOOST_LIBPATH}/libboost_date_time-${BOOST_POSTFIX})
|
||||
# If the new library names do not exist fall back to the old ones
|
||||
# to ease the transition period between the libs.
|
||||
set(BOOST_POSTFIX "vc141-mt-x64-${BOOST_VERSION}.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc141-mt-gd-x64-${BOOST_VERSION}.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_date_time-${BOOST_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_filesystem-${BOOST_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_regex-${BOOST_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_system-${BOOST_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_thread-${BOOST_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_chrono-${BOOST_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_date_time-${BOOST_DEBUG_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_filesystem-${BOOST_DEBUG_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_regex-${BOOST_DEBUG_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_system-${BOOST_DEBUG_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_thread-${BOOST_DEBUG_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_chrono-${BOOST_DEBUG_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/libboost_date_time-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_filesystem-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_regex-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_system-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_thread-${BOOST_POSTFIX}
|
||||
optimized ${BOOST_LIBPATH}/libboost_chrono-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_date_time-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_regex-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_system-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_thread-${BOOST_DEBUG_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_chrono-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
if(EXISTS ${BOOST_34_TRIGGER_FILE})
|
||||
if(WITH_USD)
|
||||
set(BOOST_PYTHON_LIBRARIES
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_DEBUG_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_POSTFIX}.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
|
||||
optimized ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_wave-${BOOST_POSTFIX}.lib
|
||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_wave-${BOOST_DEBUG_POSTFIX}.lib
|
||||
optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
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
|
||||
optimized ${BOOST_LIBPATH}/libboost_locale-${BOOST_POSTFIX}
|
||||
debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX}
|
||||
)
|
||||
endif()
|
||||
else() # we found boost using find_package
|
||||
@@ -615,10 +576,7 @@ if(WITH_OPENIMAGEIO)
|
||||
endif()
|
||||
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
|
||||
set(OPENIMAGEIO_IDIFF "${OPENIMAGEIO}/bin/idiff.exe")
|
||||
# If the .dll does not exist, assume it is a static OIIO
|
||||
if(NOT EXISTS ${OPENIMAGEIO}/bin/OpenImageIO.dll)
|
||||
add_definitions(-DOIIO_STATIC_DEFINE)
|
||||
endif()
|
||||
add_definitions(-DOIIO_NO_SSE=1)
|
||||
endif()
|
||||
|
||||
@@ -654,25 +612,18 @@ if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/OpenColorIO)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
if(EXISTS ${OPENCOLORIO_LIBPATH}/libexpatMD.lib) # 3.4
|
||||
set(OPENCOLORIO_LIBRARIES
|
||||
optimized ${OPENCOLORIO_LIBPATH}/OpenColorIO.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/libyaml-cpp.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/libexpatMD.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/pystring.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/libyaml-cpp.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/OpencolorIO_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/libyaml-cpp_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/libexpatdMD.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/pystring_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/libyaml-cpp_d.lib
|
||||
)
|
||||
endif()
|
||||
set(OPENCOLORIO_DEFINITIONS "-DOpenColorIO_SKIP_IMPORTS")
|
||||
else()
|
||||
set(OPENCOLORIO_LIBRARIES
|
||||
optimized ${OPENCOLORIO_LIBPATH}/OpenColorIO.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/OpencolorIO_d.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
@@ -876,21 +827,16 @@ endif()
|
||||
if(WITH_USD)
|
||||
windows_find_package(USD)
|
||||
if(NOT USD_FOUND)
|
||||
# 3.5 22.03 libs
|
||||
set(USD_INCLUDE_DIRS ${LIBDIR}/usd/include)
|
||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/usd_usd_ms.lib)
|
||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/usd_usd_ms_d.lib)
|
||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/usd_usd_m.lib)
|
||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/usd_usd_m_d.lib)
|
||||
set(USD_LIBRARY_DIR ${LIBDIR}/usd/lib)
|
||||
if(NOT EXISTS "${USD_RELEASE_LIB}") # 3.5 22.11 libs
|
||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/usd_ms.lib)
|
||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/usd_ms_d.lib)
|
||||
endif()
|
||||
# Older USD had different filenames, if the new ones are
|
||||
# not found see if the older ones exist, to ease the
|
||||
# transition period while landing libs.
|
||||
if(NOT EXISTS "${USD_RELEASE_LIB}") # 3.3 static libs
|
||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/usd_usd_m.lib)
|
||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/usd_usd_m_d.lib)
|
||||
if(NOT EXISTS "${USD_RELEASE_LIB}")
|
||||
set(USD_RELEASE_LIB ${LIBDIR}/usd/lib/libusd_m.lib)
|
||||
set(USD_DEBUG_LIB ${LIBDIR}/usd/lib/libusd_m_d.lib)
|
||||
endif()
|
||||
set(USD_LIBRARIES
|
||||
debug ${USD_DEBUG_LIB}
|
||||
@@ -1030,18 +976,9 @@ if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
||||
${SYCL_ROOT_DIR}/bin/pi_*.dll
|
||||
)
|
||||
list(REMOVE_ITEM _sycl_pi_runtime_libraries_glob "${SYCL_ROOT_DIR}/bin/pi_opencl.dll")
|
||||
list(APPEND _sycl_runtime_libraries ${_sycl_pi_runtime_libraries_glob})
|
||||
list (APPEND _sycl_runtime_libraries ${_sycl_pi_runtime_libraries_glob})
|
||||
unset(_sycl_pi_runtime_libraries_glob)
|
||||
|
||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
||||
unset(_sycl_runtime_libraries)
|
||||
endif()
|
||||
|
||||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ";" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD_DIRS "${LIBDIR}/OpenImageIO/bin\;${LIBDIR}/boost/lib\;${LIBDIR}/openexr/bin\;${LIBDIR}/imath/bin\;${PATH}")
|
||||
set(PLATFORM_ENV_BUILD "PATH=${PLATFORM_ENV_BUILD_DIRS}")
|
||||
# Install needs the additional folders from PLATFORM_ENV_BUILD_DIRS as well, as tools like idiff and abcls use the release mode dlls
|
||||
set(PLATFORM_ENV_INSTALL "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/\;${PLATFORM_ENV_BUILD_DIRS}\;$ENV{PATH}")
|
||||
unset(_library_paths)
|
||||
|
56
build_files/cmake/platform/platform_win32_bundle_crt.cmake
Normal file
56
build_files/cmake/platform/platform_win32_bundle_crt.cmake
Normal file
@@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# First generate the manifest for tests since it will not need the dependency on the CRT.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
|
||||
|
||||
# Always detect system libraries, since they are also used by oneAPI.
|
||||
# But don't always install them, only for WITH_WINDOWS_BUNDLE_CRT=ON.
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
|
||||
|
||||
# This sometimes can change when updates are installed and the compiler version
|
||||
# changes, so test if it exists and if not, give InstallRequiredSystemLibraries
|
||||
# another chance to figure out the path.
|
||||
if(MSVC_REDIST_DIR AND NOT EXISTS "${MSVC_REDIST_DIR}")
|
||||
unset(MSVC_REDIST_DIR CACHE)
|
||||
endif()
|
||||
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
if(WITH_WINDOWS_BUNDLE_CRT)
|
||||
# ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
|
||||
# redirects for this dll, for details see T88813.
|
||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||
string(FIND ${lib} "ucrtbase" pos)
|
||||
if(NOT pos EQUAL -1)
|
||||
list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
|
||||
install(FILES ${lib} DESTINATION . COMPONENT Libraries)
|
||||
endif()
|
||||
endforeach()
|
||||
# Install the CRT to the blender.crt Sub folder.
|
||||
install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)
|
||||
|
||||
# Generating the manifest is a relatively expensive operation since
|
||||
# it is collecting an sha1 hash for every file required. so only do
|
||||
# this work when the libs have either changed or the manifest does
|
||||
# not exist yet.
|
||||
|
||||
string(SHA1 libshash "${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}")
|
||||
set(manifest_trigger_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/crt_${libshash}")
|
||||
|
||||
if(NOT EXISTS ${manifest_trigger_file})
|
||||
set(CRTLIBS "")
|
||||
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||
get_filename_component(filename ${lib} NAME)
|
||||
file(SHA1 "${lib}" sha1_file)
|
||||
string(APPEND CRTLIBS " <file name=\"${filename}\" hash=\"${sha1_file}\" hashalg=\"SHA1\" />\n")
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.crt.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest @ONLY)
|
||||
file(TOUCH ${manifest_trigger_file})
|
||||
endif()
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
|
||||
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest @ONLY)
|
@@ -30,7 +30,7 @@ update-code:
|
||||
linux-x86_64:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
path: lib/linux_x86_64_glibc_228
|
||||
path: lib/linux_centos7_x86_64
|
||||
windows-amd64:
|
||||
branch: trunk
|
||||
commit_id: HEAD
|
||||
@@ -49,7 +49,7 @@ update-code:
|
||||
#
|
||||
buildbot:
|
||||
gcc:
|
||||
version: '11.0.0'
|
||||
version: '9.0.0'
|
||||
cuda10:
|
||||
version: '10.1.243'
|
||||
cuda11:
|
||||
|
@@ -53,23 +53,11 @@ This package provides Blender as a Python module for use in studio pipelines, we
|
||||
|
||||
[System requirements](https://www.blender.org/download/requirements/) are the same as Blender.
|
||||
|
||||
Each Blender release supports one Python version, and the package is only compatible with that version.
|
||||
|
||||
## Source Code
|
||||
|
||||
* [Releases](https://download.blender.org/source/)
|
||||
* Repository: [git.blender.org/blender.git](https://git.blender.org/gitweb/gitweb.cgi/blender.git)
|
||||
|
||||
## Credits
|
||||
|
||||
Created by the [Blender developer community](https://www.blender.org/about/credits/).
|
||||
|
||||
Thanks to Tyler Alden Gubala for maintaining the original version of this package."""
|
||||
Each Blender release supports one Python version, and the package is only compatible with that version."""
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Generic Functions
|
||||
|
||||
|
||||
def find_dominating_file(
|
||||
path: str,
|
||||
search: Sequence[str],
|
||||
|
@@ -41,7 +41,7 @@ def parse_arguments() -> argparse.Namespace:
|
||||
parser.add_argument("--svn-command", default="svn")
|
||||
parser.add_argument("--svn-branch", default=None)
|
||||
parser.add_argument("--git-command", default="git")
|
||||
parser.add_argument("--use-linux-libraries", action="store_true")
|
||||
parser.add_argument("--use-centos-libraries", action="store_true")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
||||
# this script is bundled as part of the precompiled libraries. However it
|
||||
# is used by the buildbot.
|
||||
lib_platform = "win64_vc15"
|
||||
elif args.use_linux_libraries:
|
||||
lib_platform = "linux_x86_64_glibc_228"
|
||||
elif args.use_centos_libraries:
|
||||
lib_platform = "linux_centos7_x86_64"
|
||||
else:
|
||||
# No precompiled libraries for Linux.
|
||||
lib_platform = None
|
||||
|
@@ -10,9 +10,8 @@ Only keyword arguments can be used to pass operator properties.
|
||||
Operators don't have return values as you might expect,
|
||||
instead they return a set() which is made up of:
|
||||
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
|
||||
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``, the latter
|
||||
meaning that the operator execution was aborted without making any changes or
|
||||
saving an undo history entry.
|
||||
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
|
||||
|
||||
|
||||
Calling an operator in the wrong context will raise a ``RuntimeError``,
|
||||
there is a poll() method to avoid this problem.
|
||||
|
@@ -44,7 +44,6 @@ class ModalOperator(bpy.types.Operator):
|
||||
elif event.type == 'LEFTMOUSE': # Confirm
|
||||
return {'FINISHED'}
|
||||
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
||||
# Revert all changes that have been made
|
||||
context.object.location.x = self.init_loc_x
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
@@ -7,16 +7,9 @@ This script shows simple operator which prints a message.
|
||||
Since the operator only has an :class:`Operator.execute` function it takes no
|
||||
user input.
|
||||
|
||||
The function should return ``{'FINISHED'}`` or ``{'CANCELLED'}``, the latter
|
||||
meaning that operator execution was aborted without making any changes, and
|
||||
saving an undo entry isn't neccesary. If an error is detected after some changes
|
||||
have already been made, use the ``{'FINISHED'}`` return code, or the behavior
|
||||
of undo will be confusing for the user.
|
||||
|
||||
.. note::
|
||||
|
||||
Operator subclasses must be registered before accessing them from blender.
|
||||
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
@@ -870,26 +870,6 @@ an issue but, due to internal implementation details, currently are:
|
||||
thus breaking any current iteration over ``Collection.all_objects``.
|
||||
|
||||
|
||||
.. rubric:: Do not:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# `all_objects` is an iterator. Using it directly while performing operations on its members that will update
|
||||
# the memory accessed by the `all_objects` iterator will lead to invalid memory accesses and crashes.
|
||||
for object in bpy.data.collections["Collection"].all_objects:
|
||||
object.hide_viewport = True
|
||||
|
||||
|
||||
.. rubric:: Do:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# `all_objects[:]` is an independent list generated from the iterator. As long as no objects are deleted,
|
||||
# its content will remain valid even if the data accessed by the `all_objects` iterator is modified.
|
||||
for object in bpy.data.collections["Collection"].all_objects[:]:
|
||||
object.hide_viewport = True
|
||||
|
||||
|
||||
sys.exit
|
||||
========
|
||||
|
||||
|
@@ -235,6 +235,27 @@ def main():
|
||||
if args_out is not None:
|
||||
args_out_index[:] = [i for (i, a) in enumerate(args_out) if type(a) == tuple]
|
||||
|
||||
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([args_in[i][0] for i in args_in_index])))
|
||||
|
||||
# -- wash the comment
|
||||
comment_washed = []
|
||||
comment = [] if comment is None else comment
|
||||
for i, l in enumerate(comment):
|
||||
assert ((l.strip() == "") or
|
||||
(l in {"/*", " *"}) or
|
||||
(l.startswith(("/* ", " * "))))
|
||||
|
||||
l = l[3:]
|
||||
if i == 0 and not l.strip():
|
||||
continue
|
||||
if l.strip():
|
||||
l = " " + l
|
||||
comment_washed.append(l)
|
||||
|
||||
fw("\n".join(comment_washed))
|
||||
fw("\n")
|
||||
# -- done
|
||||
|
||||
# get the args
|
||||
def get_args_wash(args, args_index, is_ret):
|
||||
args_wash = []
|
||||
@@ -275,36 +296,26 @@ def main():
|
||||
if comment_next:
|
||||
comment += ("\n" if comment_prev else "") + comment_next.strip()
|
||||
|
||||
default_value = None
|
||||
if tp == BMO_OP_SLOT_FLT:
|
||||
tp_str = "float"
|
||||
default_value = '0'
|
||||
|
||||
elif tp == BMO_OP_SLOT_INT:
|
||||
if tp_sub == BMO_OP_SLOT_SUBTYPE_INT_ENUM:
|
||||
default_value = enums.split(",", 1)[0].strip("[")
|
||||
tp_str = "enum in " + enums + ", default " + default_value
|
||||
tp_str = "enum in " + enums + ", default " + enums.split(",", 1)[0].strip("[")
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_INT_FLAG:
|
||||
default_value = 'set()'
|
||||
tp_str = "set of flags from " + enums + ", default " + default_value
|
||||
tp_str = "set of flags from " + enums + ", default {}"
|
||||
else:
|
||||
tp_str = "int"
|
||||
default_value = '0'
|
||||
elif tp == BMO_OP_SLOT_BOOL:
|
||||
tp_str = "bool"
|
||||
default_value = 'False'
|
||||
elif tp == BMO_OP_SLOT_MAT:
|
||||
tp_str = ":class:`mathutils.Matrix`"
|
||||
default_value = 'mathutils.Matrix.Identity(4)'
|
||||
elif tp == BMO_OP_SLOT_VEC:
|
||||
tp_str = ":class:`mathutils.Vector`"
|
||||
default_value = 'mathutils.Vector()'
|
||||
if not is_ret:
|
||||
tp_str += " or any sequence of 3 floats"
|
||||
elif tp == BMO_OP_SLOT_PTR:
|
||||
tp_str = "dict"
|
||||
assert tp_sub is not None
|
||||
if 'if None' in comment:
|
||||
default_value = 'None'
|
||||
if tp_sub == BMO_OP_SLOT_SUBTYPE_PTR_BMESH:
|
||||
tp_str = ":class:`bmesh.types.BMesh`"
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_PTR_SCENE:
|
||||
@@ -337,16 +348,13 @@ def main():
|
||||
tp_str = "/".join(ls)
|
||||
else:
|
||||
tp_str = ("list of (%s)" % ", ".join(ls))
|
||||
default_value = '[]'
|
||||
|
||||
del ls
|
||||
elif tp == BMO_OP_SLOT_MAPPING:
|
||||
if tp_sub & BMO_OP_SLOT_SUBTYPE_MAP_EMPTY:
|
||||
tp_str = "set of vert/edge/face type"
|
||||
default_value = 'set()'
|
||||
else:
|
||||
tp_str = "dict mapping vert/edge/face types to "
|
||||
default_value = '{}'
|
||||
if tp_sub == BMO_OP_SLOT_SUBTYPE_MAP_BOOL:
|
||||
tp_str += "bool"
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_MAP_INT:
|
||||
@@ -364,40 +372,18 @@ def main():
|
||||
print("Can't find", vars_dict_reverse[tp])
|
||||
assert 0
|
||||
|
||||
args_wash.append((name, default_value, tp_str, comment))
|
||||
args_wash.append((name, tp_str, comment))
|
||||
return args_wash
|
||||
# end get_args_wash
|
||||
|
||||
args_in_wash = get_args_wash(args_in, args_in_index, False)
|
||||
|
||||
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([arg_name_with_default(arg) for arg in args_in_wash])))
|
||||
|
||||
# -- wash the comment
|
||||
comment_washed = []
|
||||
comment = [] if comment is None else comment
|
||||
for i, l in enumerate(comment):
|
||||
assert ((l.strip() == "") or
|
||||
(l in {"/*", " *"}) or
|
||||
(l.startswith(("/* ", " * "))))
|
||||
|
||||
l = l[3:]
|
||||
if i == 0 and not l.strip():
|
||||
continue
|
||||
if l.strip():
|
||||
l = " " + l
|
||||
comment_washed.append(l)
|
||||
|
||||
fw("\n".join(comment_washed))
|
||||
fw("\n")
|
||||
# -- done
|
||||
|
||||
# all ops get this arg
|
||||
fw(" :arg bm: The bmesh to operate on.\n")
|
||||
fw(" :type bm: :class:`bmesh.types.BMesh`\n")
|
||||
|
||||
args_in_wash = get_args_wash(args_in, args_in_index, False)
|
||||
args_out_wash = get_args_wash(args_out, args_out_index, True)
|
||||
|
||||
for (name, _, tp, comment) in args_in_wash:
|
||||
for (name, tp, comment) in args_in_wash:
|
||||
if comment == "":
|
||||
comment = "Undocumented."
|
||||
|
||||
@@ -407,7 +393,7 @@ def main():
|
||||
if args_out_wash:
|
||||
fw(" :return:\n\n")
|
||||
|
||||
for (name, _, tp, comment) in args_out_wash:
|
||||
for (name, tp, comment) in args_out_wash:
|
||||
assert name.endswith(".out")
|
||||
name = name[:-4]
|
||||
fw(" - ``%s``: %s\n\n" % (name, comment))
|
||||
@@ -423,12 +409,5 @@ def main():
|
||||
print(OUT_RST)
|
||||
|
||||
|
||||
def arg_name_with_default(arg):
|
||||
name, default_value, _, _ = arg
|
||||
if default_value is None:
|
||||
return name
|
||||
return name + '=' + default_value
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
7
extern/mantaflow/helper/util/vectorbase.h
vendored
7
extern/mantaflow/helper/util/vectorbase.h
vendored
@@ -31,6 +31,13 @@
|
||||
# undef max
|
||||
#endif
|
||||
|
||||
// redefine usage of some windows functions
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
# ifndef snprintf
|
||||
# define snprintf _snprintf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// use which fp-precision? 1=float, 2=double
|
||||
#ifndef FLOATINGPOINT_PRECISION
|
||||
# define FLOATINGPOINT_PRECISION 1
|
||||
|
@@ -298,7 +298,7 @@ if(WITH_CYCLES_DEVICE_METAL)
|
||||
add_definitions(-DWITH_METAL)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_DEVICE_ONEAPI)
|
||||
if (WITH_CYCLES_DEVICE_ONEAPI)
|
||||
add_definitions(-DWITH_ONEAPI)
|
||||
endif()
|
||||
|
||||
|
@@ -62,6 +62,7 @@ include_directories(SYSTEM ${INC_SYS})
|
||||
if(WITH_CYCLES_STANDALONE)
|
||||
set(SRC
|
||||
cycles_standalone.cpp
|
||||
cycles_precompute.cpp
|
||||
cycles_xml.cpp
|
||||
cycles_xml.h
|
||||
oiio_output_driver.cpp
|
||||
|
444
intern/cycles/app/cycles_precompute.cpp
Normal file
444
intern/cycles/app/cycles_precompute.cpp
Normal file
@@ -0,0 +1,444 @@
|
||||
#include "util/math.h"
|
||||
#include "util/string.h"
|
||||
#include "util/system.h"
|
||||
|
||||
#include "util/hash.h"
|
||||
#include "util/task.h"
|
||||
|
||||
#include "kernel/device/cpu/compat.h"
|
||||
#include "kernel/device/cpu/globals.h"
|
||||
|
||||
#include "kernel/sample/lcg.h"
|
||||
#include "kernel/sample/mapping.h"
|
||||
|
||||
#include "kernel/closure/bsdf_microfacet.h"
|
||||
#include "kernel/closure/bsdf_microfacet_glass.h"
|
||||
#include "kernel/closure/bsdf_principled_sheen.h"
|
||||
|
||||
#include "scene/shader.tables"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* TODO: Is there a way to not duplicate the regular microfacet_ggx_E
|
||||
* without setting up an entire fake KernelGlobals? */
|
||||
static float lookup_table_read(const float *table, float x, int size)
|
||||
{
|
||||
x = clamp(x * size - 0.5f, 0.0f, (float)size);
|
||||
|
||||
int index = min(float_to_int(x), size - 1);
|
||||
int nindex = min(index + 1, size - 1);
|
||||
float t = x - index;
|
||||
|
||||
float data0 = table[index];
|
||||
if (t == 0.0f)
|
||||
return data0;
|
||||
|
||||
float data1 = table[nindex];
|
||||
return mix(data0, data1, t);
|
||||
}
|
||||
|
||||
static float lookup_table_read_2D(const float *table, float x, float y, int xsize, int ysize)
|
||||
{
|
||||
y = clamp(y * ysize - 0.5f, 0.0f, (float)ysize);
|
||||
|
||||
int index = min(float_to_int(y), ysize - 1);
|
||||
int nindex = min(index + 1, ysize - 1);
|
||||
float t = y - index;
|
||||
|
||||
float data0 = lookup_table_read(table + xsize * nindex, x, xsize);
|
||||
if (t == 0.0f)
|
||||
return data0;
|
||||
|
||||
float data1 = lookup_table_read(table + xsize * nindex, x, xsize);
|
||||
return mix(data0, data1, t);
|
||||
}
|
||||
|
||||
static float microfacet_ggx_E(float mu, float rough)
|
||||
{
|
||||
return lookup_table_read_2D(&table_ggx_E[0][0], mu, 1 - rough, 32, 32);
|
||||
}
|
||||
|
||||
static float microfacet_ggx_E_avg(float rough)
|
||||
{
|
||||
return lookup_table_read(table_ggx_E_avg, 1 - rough, 32);
|
||||
}
|
||||
|
||||
/* From PBRT: core/montecarlo.h */
|
||||
inline float VanDerCorput(uint32_t n, uint32_t scramble)
|
||||
{
|
||||
n = (n << 16) | (n >> 16);
|
||||
n = ((n & 0x00ff00ff) << 8) | ((n & 0xff00ff00) >> 8);
|
||||
n = ((n & 0x0f0f0f0f) << 4) | ((n & 0xf0f0f0f0) >> 4);
|
||||
n = ((n & 0x33333333) << 2) | ((n & 0xcccccccc) >> 2);
|
||||
n = ((n & 0x55555555) << 1) | ((n & 0xaaaaaaaa) >> 1);
|
||||
n ^= scramble;
|
||||
return ((n >> 8) & 0xffffff) / float(1 << 24);
|
||||
}
|
||||
inline float Sobol2(uint32_t n, uint32_t scramble)
|
||||
{
|
||||
for (uint32_t v = 1 << 31; n != 0; n >>= 1, v ^= v >> 1)
|
||||
if (n & 0x1)
|
||||
scramble ^= v;
|
||||
return ((scramble >> 8) & 0xffffff) / float(1 << 24);
|
||||
}
|
||||
|
||||
static float precompute_sheen_E(float rough, float mu, float u1, float u2)
|
||||
{
|
||||
PrincipledSheenBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_PRINCIPLED_SHEEN_V2_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.roughness = sqr(rough);
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f;
|
||||
bsdf_principled_sheen_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf);
|
||||
if (pdf != 0.0f) {
|
||||
return clamp(average(eval) / pdf, 0.0f, 1e5f);
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static float precompute_clearcoat_E(float rough, float mu, float u1, float u2)
|
||||
{
|
||||
MicrofacetBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_MICROFACET_GGX_CLEARCOAT_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.alpha_x = bsdf.alpha_y = sqr(rough);
|
||||
bsdf.ior = 1.5f;
|
||||
bsdf.extra = nullptr;
|
||||
bsdf.T = make_float3(1.0f, 0.0f, 0.0f);
|
||||
|
||||
/* Account for the albedo scaling that the closure performs.
|
||||
* Dependency warning - this relies on the ggx_E and ggx_E_avg lookup tables! */
|
||||
float E = microfacet_ggx_E(mu, rough), E_avg = microfacet_ggx_E_avg(rough);
|
||||
float Fss = dielectric_fresnel_Fss(1.5f);
|
||||
float Fms = Fss * E_avg / (1.0f - Fss * (1.0f - E_avg));
|
||||
float albedo_scale = 1.0f + Fms * ((1.0f - E) / E);
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f, sampled_eta;
|
||||
float2 sampled_roughness;
|
||||
bsdf_microfacet_ggx_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf,
|
||||
&sampled_roughness,
|
||||
&sampled_eta);
|
||||
if (pdf != 0.0f) {
|
||||
/* Encode relative to macrosurface Fresnel, saves resolution.
|
||||
* TODO: Worth the extra evaluation? */
|
||||
return albedo_scale * (average(eval) / pdf) / fresnel_dielectric_cos(mu, 1.5f);
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static float precompute_ggx_E(float rough, float mu, float u1, float u2)
|
||||
{
|
||||
MicrofacetBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_MICROFACET_GGX_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.alpha_x = bsdf.alpha_y = sqr(rough);
|
||||
bsdf.ior = 1.0f;
|
||||
bsdf.extra = nullptr;
|
||||
bsdf.T = make_float3(1.0f, 0.0f, 0.0f);
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f, sampled_eta;
|
||||
float2 sampled_roughness;
|
||||
bsdf_microfacet_ggx_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf,
|
||||
&sampled_roughness,
|
||||
&sampled_eta);
|
||||
if (pdf != 0.0f) {
|
||||
return average(eval) / pdf;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static float precompute_ggx_refract_E(float rough, float mu, float eta, float u1, float u2)
|
||||
{
|
||||
MicrofacetBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.alpha_x = bsdf.alpha_y = sqr(rough);
|
||||
bsdf.ior = eta;
|
||||
bsdf.extra = nullptr;
|
||||
bsdf.T = make_float3(1.0f, 0.0f, 0.0f);
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f, sampled_eta;
|
||||
float2 sampled_roughness;
|
||||
bsdf_microfacet_ggx_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf,
|
||||
&sampled_roughness,
|
||||
&sampled_eta);
|
||||
if (pdf != 0.0f) {
|
||||
return average(eval) / pdf;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static float precompute_ggx_glass_E(float rough, float mu, float eta, float u1, float u2)
|
||||
{
|
||||
MicrofacetBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.alpha_x = bsdf.alpha_y = sqr(rough);
|
||||
bsdf.ior = eta;
|
||||
bsdf.extra = nullptr;
|
||||
bsdf.T = make_float3(1.0f, 0.0f, 0.0f);
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f, sampled_eta;
|
||||
float2 sampled_roughness;
|
||||
bsdf_microfacet_ggx_glass_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf,
|
||||
&sampled_roughness,
|
||||
&sampled_eta);
|
||||
if (pdf != 0.0f) {
|
||||
return average(eval) / pdf;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
static float precompute_ggx_dielectric_E(float rough, float mu, float eta, float u1, float u2)
|
||||
{
|
||||
{
|
||||
/* Reparametrize based on macrosurface fresnel to get more resolution into areas where
|
||||
* the Fresnel curve is rapidly changing. Particularly important for eta<1 due to the TIR edge.
|
||||
* However, in the eta<1 case, the entire TIR area would be compressed down to a point, which
|
||||
* is an issue since there are changes in that range at higher roughnesses.
|
||||
* Therefore, the remapping is blended with the identity function for a compromise.
|
||||
*/
|
||||
float F0 = fresnel_dielectric_F0(eta);
|
||||
auto get_remap = [eta, F0](float x) {
|
||||
return mix(x, inverse_lerp(1.0f, F0, fresnel_dielectric_cos(x, eta)), 0.5f);
|
||||
};
|
||||
|
||||
float remap_target = mu;
|
||||
float start = 0.0f, end = 1.0f;
|
||||
while (end - start > 1e-7f) {
|
||||
mu = (end + start) * 0.5f;
|
||||
if (get_remap(mu) > remap_target) {
|
||||
end = mu;
|
||||
}
|
||||
else {
|
||||
start = mu;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MicrofacetExtrav2 extra;
|
||||
MicrofacetBsdf bsdf;
|
||||
bsdf.weight = one_float3();
|
||||
bsdf.type = CLOSURE_BSDF_MICROFACET_GGX_FRESNEL_V2_ID;
|
||||
bsdf.sample_weight = 1.0f;
|
||||
bsdf.N = make_float3(0.0f, 0.0f, 1.0f);
|
||||
bsdf.alpha_x = bsdf.alpha_y = sqr(rough);
|
||||
bsdf.ior = eta;
|
||||
bsdf.extra = (MicrofacetExtra *)&extra;
|
||||
bsdf.T = make_float3(1.0f, 0.0f, 0.0f);
|
||||
extra.metallic = extra.metal_base = extra.metal_edge_factor = zero_float3();
|
||||
|
||||
/* Dependency warning - this relies on the ggx_E and ggx_E_avg lookup tables! */
|
||||
float E = microfacet_ggx_E(mu, rough), E_avg = microfacet_ggx_E_avg(rough);
|
||||
float Fss = dielectric_fresnel_Fss(eta);
|
||||
float Fms = Fss * E_avg / (1.0f - Fss * (1.0f - E_avg));
|
||||
extra.dielectric = make_spectrum(1.0f + Fms * ((1.0f - E) / E));
|
||||
extra.thin_film_thickness = 0.0f;
|
||||
|
||||
float3 omega_in;
|
||||
Spectrum eval;
|
||||
float pdf = 0.0f, sampled_eta;
|
||||
float2 sampled_roughness;
|
||||
bsdf_microfacet_ggx_sample((ShaderClosure *)&bsdf,
|
||||
make_float3(0.0f, 0.0f, 1.0f),
|
||||
make_float3(sqrtf(1.0f - sqr(mu)), 0.0f, mu),
|
||||
u1,
|
||||
u2,
|
||||
&eval,
|
||||
&omega_in,
|
||||
&pdf,
|
||||
&sampled_roughness,
|
||||
&sampled_eta);
|
||||
if (pdf != 0.0f) {
|
||||
return average(eval) / pdf;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
struct PrecomputeTerm {
|
||||
int dim, samples, res;
|
||||
std::function<float(float, float, float, float, float)> evaluation;
|
||||
};
|
||||
|
||||
bool cycles_precompute(std::string name);
|
||||
bool cycles_precompute(std::string name)
|
||||
{
|
||||
std::map<string, PrecomputeTerm> precompute_terms;
|
||||
precompute_terms["sheen_E"] = {
|
||||
2, 1 << 23, 32, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_sheen_E(rough, mu, u1, u2);
|
||||
}};
|
||||
precompute_terms["clearcoat_E"] = {
|
||||
2, 1 << 23, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_clearcoat_E(rough, mu, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_E"] = {
|
||||
2, 1 << 23, 32, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_E(rough, mu, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_E_avg"] = {
|
||||
1, 1 << 23, 32, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return 2.0f * mu * precompute_ggx_E(rough, mu, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_glass_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_glass_E(rough, mu, ior, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_glass_inv_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_glass_E(rough, mu, 1.0f / ior, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_refract_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_refract_E(rough, mu, ior, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_refract_inv_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_refract_E(rough, mu, 1.0f / ior, u1, u2);
|
||||
}};
|
||||
precompute_terms["ggx_dielectric_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_dielectric_E(rough, mu, ior, u1, u2);
|
||||
}};
|
||||
// TODO: Consider more X resolution for this table.
|
||||
precompute_terms["ggx_dielectric_inv_E"] = {
|
||||
3, 1 << 20, 16, [](float rough, float mu, float ior, float u1, float u2) {
|
||||
return precompute_ggx_dielectric_E(rough, mu, 1.0f / ior, u1, u2);
|
||||
}};
|
||||
|
||||
if (precompute_terms.count(name) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const PrecomputeTerm &term = precompute_terms[name];
|
||||
|
||||
const int samples = term.samples;
|
||||
const int res = term.res;
|
||||
const int nz = (term.dim > 2) ? res : 1, ny = res, nx = (term.dim > 1) ? res : 1;
|
||||
|
||||
if (nz > 1) {
|
||||
std::cout << "static const float table_" << name << "[" << nz << "][" << ny << "][" << nx
|
||||
<< "] = {" << std::endl;
|
||||
}
|
||||
for (int z = 0; z < nz; z++) {
|
||||
float *data = new float[nx * ny];
|
||||
parallel_for(0, ny, [&](int64_t y) {
|
||||
for (int x = 0; x < nx; x++) {
|
||||
uint rng = hash_uint2(x, y);
|
||||
uint scramble1 = lcg_step_uint(&rng), scramble2 = lcg_step_uint(&rng);
|
||||
double sum = 0.0;
|
||||
for (int i = 0; i < samples; i++) {
|
||||
float rough = 1.0f - (float(y) + lcg_step_float(&rng)) / float(ny);
|
||||
float mu = (float(x) + lcg_step_float(&rng)) / float(nx);
|
||||
float ior = (float(z) + lcg_step_float(&rng)) / float(nz);
|
||||
/* Encode IOR remapped as sqrt(0.5*(IOR-1)) for more resolution at the start, where most
|
||||
* of the changes happen (also places the most common range around 1.5 in the center) */
|
||||
ior = 1.0f + 2.0f * sqr(ior);
|
||||
float u1 = VanDerCorput(i, scramble1);
|
||||
float u2 = Sobol2(i, scramble2);
|
||||
|
||||
float value = term.evaluation(rough, mu, ior, u1, u2);
|
||||
if (isnan(value)) {
|
||||
value = 0.0f;
|
||||
}
|
||||
sum += (double)value;
|
||||
}
|
||||
data[y * nx + x] = float(sum / double(samples));
|
||||
}
|
||||
});
|
||||
|
||||
string filename = name;
|
||||
if (nz > 1) {
|
||||
filename += string_printf("_%02d", z);
|
||||
std::cout << " {" << std::endl;
|
||||
}
|
||||
else {
|
||||
std::cout << "static const float table_" << name << "[" << ny << "][" << nx << "] = {"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
for (int y = 0; y < ny; y++) {
|
||||
std::cout << " {";
|
||||
for (int x = 0; x < nx; x++) {
|
||||
std::cout << data[y * nx + x] << ((x + 1 == nx) ? "f" : "f, ");
|
||||
}
|
||||
std::cout << ((y + 1 == ny) ? "}" : "},") << std::endl;
|
||||
}
|
||||
if (nz > 1) {
|
||||
std::cout << ((z + 1 == nz) ? " }" : " },") << std::endl;
|
||||
}
|
||||
else {
|
||||
std::cout << "};" << std::endl;
|
||||
}
|
||||
|
||||
FILE *f = fopen((filename + ".pfm").c_str(), "w");
|
||||
fprintf(f, "Pf\n%d %d\n-1.0\n", nx, ny);
|
||||
fwrite(data, sizeof(float), nx * ny, f);
|
||||
fclose(f);
|
||||
}
|
||||
if (nz > 1) {
|
||||
std::cout << "};" << std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
@@ -37,6 +37,8 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
bool cycles_precompute(std::string name);
|
||||
|
||||
struct Options {
|
||||
Session *session;
|
||||
Scene *scene;
|
||||
@@ -536,6 +538,10 @@ int main(int argc, const char **argv)
|
||||
path_init();
|
||||
options_parse(argc, argv);
|
||||
|
||||
if (cycles_precompute(options.filepath)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef WITH_CYCLES_STANDALONE_GUI
|
||||
if (options.session_params.background) {
|
||||
#endif
|
||||
|
@@ -3,11 +3,6 @@
|
||||
|
||||
#include "app/oiio_output_driver.h"
|
||||
|
||||
#include "scene/colorspace.h"
|
||||
|
||||
#include <OpenImageIO/imagebuf.h>
|
||||
#include <OpenImageIO/imagebufalgo.h>
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
OIIOOutputDriver::OIIOOutputDriver(const string_view filepath,
|
||||
@@ -52,23 +47,11 @@ void OIIOOutputDriver::write_render_tile(const Tile &tile)
|
||||
}
|
||||
|
||||
/* Manipulate offset and stride to convert from bottom-up to top-down convention. */
|
||||
ImageBuf image_buffer(spec,
|
||||
image_output->write_image(TypeDesc::FLOAT,
|
||||
pixels.data() + (height - 1) * width * 4,
|
||||
AutoStride,
|
||||
-width * 4 * sizeof(float),
|
||||
AutoStride);
|
||||
|
||||
/* Apply gamma correction for (some) non-linear file formats.
|
||||
* TODO: use OpenColorIO view transform if available. */
|
||||
if (ColorSpaceManager::detect_known_colorspace(
|
||||
u_colorspace_auto, "", image_output->format_name(), true) == u_colorspace_srgb) {
|
||||
const float g = 1.0f / 2.2f;
|
||||
ImageBufAlgo::pow(image_buffer, image_buffer, {g, g, g, 1.0f});
|
||||
}
|
||||
|
||||
/* Write to disk and close */
|
||||
image_buffer.set_write_format(TypeDesc::FLOAT);
|
||||
image_buffer.write(image_output.get());
|
||||
image_output->close();
|
||||
}
|
||||
|
||||
|
@@ -204,6 +204,7 @@ def list_render_passes(scene, srl):
|
||||
if crl.use_pass_volume_indirect: yield ("VolumeInd", "RGB", 'COLOR')
|
||||
if srl.use_pass_emit: yield ("Emit", "RGB", 'COLOR')
|
||||
if srl.use_pass_environment: yield ("Env", "RGB", 'COLOR')
|
||||
if srl.use_pass_shadow: yield ("Shadow", "RGB", 'COLOR')
|
||||
if srl.use_pass_ambient_occlusion: yield ("AO", "RGB", 'COLOR')
|
||||
if crl.use_pass_shadow_catcher: yield ("Shadow Catcher", "RGB", 'COLOR')
|
||||
# autopep8: on
|
||||
|
@@ -92,7 +92,7 @@ class AddPresetPerformance(AddPresetBase, Operator):
|
||||
|
||||
preset_defines = [
|
||||
"render = bpy.context.scene.render",
|
||||
"cycles = bpy.context.scene.cycles",
|
||||
"cycles = bpy.context.scene.cycles"
|
||||
]
|
||||
|
||||
preset_values = [
|
||||
|
@@ -82,31 +82,8 @@ enum_use_layer_samples = (
|
||||
)
|
||||
|
||||
enum_sampling_pattern = (
|
||||
('SOBOL_BURLEY', "Sobol-Burley", "Use on-the-fly computed Owen-scrambled Sobol for random sampling", 0),
|
||||
('TABULATED_SOBOL', "Tabulated Sobol", "Use pre-computed tables of Owen-scrambled Sobol for random sampling", 1),
|
||||
)
|
||||
|
||||
enum_emission_sampling = (
|
||||
('NONE',
|
||||
'None',
|
||||
"Do not use this surface as a light for sampling",
|
||||
0),
|
||||
('AUTO',
|
||||
'Auto',
|
||||
"Automatically determine if the surface should be treated as a light for sampling, based on estimated emission intensity",
|
||||
1),
|
||||
('FRONT',
|
||||
'Front',
|
||||
"Treat only front side of the surface as a light, usually for closed meshes whose interior is not visible",
|
||||
2),
|
||||
('BACK',
|
||||
'Back',
|
||||
"Treat only back side of the surface as a light for sampling",
|
||||
3),
|
||||
('FRONT_BACK',
|
||||
'Front and Back',
|
||||
"Treat surface as a light for sampling, emitting from both the front and back side",
|
||||
4),
|
||||
('SOBOL', "Sobol-Burley", "Use Sobol-Burley random sampling pattern", 0),
|
||||
('PROGRESSIVE_MULTI_JITTER', "Progressive Multi-Jitter", "Use Progressive Multi-Jitter random sampling pattern", 1),
|
||||
)
|
||||
|
||||
enum_volume_sampling = (
|
||||
@@ -170,6 +147,7 @@ enum_view3d_shading_render_pass = (
|
||||
('EMISSION', "Emission", "Show the Emission render pass"),
|
||||
('BACKGROUND', "Background", "Show the Background render pass"),
|
||||
('AO', "Ambient Occlusion", "Show the Ambient Occlusion render pass"),
|
||||
('SHADOW', "Shadow", "Show the Shadow render pass"),
|
||||
('SHADOW_CATCHER', "Shadow Catcher", "Show the Shadow Catcher render pass"),
|
||||
|
||||
('', "Light", ""),
|
||||
@@ -412,9 +390,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
sampling_pattern: EnumProperty(
|
||||
name="Sampling Pattern",
|
||||
description="Random sampling pattern used by the integrator",
|
||||
description="Random sampling pattern used by the integrator. When adaptive sampling is enabled, Progressive Multi-Jitter is always used instead of Sobol-Burley",
|
||||
items=enum_sampling_pattern,
|
||||
default='TABULATED_SOBOL',
|
||||
default='PROGRESSIVE_MULTI_JITTER',
|
||||
)
|
||||
|
||||
scrambling_distance: FloatProperty(
|
||||
@@ -503,12 +481,6 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
default='MULTIPLE_IMPORTANCE_SAMPLING',
|
||||
)
|
||||
|
||||
use_light_tree: BoolProperty(
|
||||
name="Light Tree",
|
||||
description="Sample multiple lights more efficiently based on estimated contribution at every shading point",
|
||||
default=True,
|
||||
)
|
||||
|
||||
min_light_bounces: IntProperty(
|
||||
name="Min Light Bounces",
|
||||
description="Minimum number of light bounces. Setting this higher reduces noise in the first bounces, "
|
||||
@@ -650,7 +622,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
transparent_max_bounces: IntProperty(
|
||||
name="Transparent Max Bounces",
|
||||
description="Maximum number of transparent bounces. This is independent of maximum number of other bounces",
|
||||
description="Maximum number of transparent bounces. This is independent of maximum number of other bounces ",
|
||||
min=0, max=1024,
|
||||
default=8,
|
||||
)
|
||||
@@ -905,8 +877,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
use_fast_gi: BoolProperty(
|
||||
name="Fast GI Approximation",
|
||||
description="Approximate diffuse indirect light with background tinted ambient occlusion. "
|
||||
"This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
||||
description="Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
||||
default=False,
|
||||
)
|
||||
|
||||
@@ -1072,13 +1043,13 @@ class CyclesCameraSettings(bpy.types.PropertyGroup):
|
||||
|
||||
class CyclesMaterialSettings(bpy.types.PropertyGroup):
|
||||
|
||||
emission_sampling: EnumProperty(
|
||||
name="Emission Sampling",
|
||||
description="Sampling strategy for emissive surfaces",
|
||||
items=enum_emission_sampling,
|
||||
default="AUTO",
|
||||
sample_as_light: BoolProperty(
|
||||
name="Multiple Importance Sample",
|
||||
description="Use multiple importance sampling for this material, "
|
||||
"disabling may reduce overall noise for large "
|
||||
"objects that emit little light compared to other light sources",
|
||||
default=True,
|
||||
)
|
||||
|
||||
use_transparent_shadow: BoolProperty(
|
||||
name="Transparent Shadows",
|
||||
description="Use transparent shadows for this material if it contains a Transparent BSDF, "
|
||||
@@ -1207,7 +1178,7 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
|
||||
)
|
||||
homogeneous_volume: BoolProperty(
|
||||
name="Homogeneous Volume",
|
||||
description="When using volume rendering, assume volume has the same density everywhere "
|
||||
description="When using volume rendering, assume volume has the same density everywhere"
|
||||
"(not using any textures), for faster rendering",
|
||||
default=False,
|
||||
)
|
||||
@@ -1540,24 +1511,10 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
|
||||
use_metalrt: BoolProperty(
|
||||
name="MetalRT (Experimental)",
|
||||
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better "
|
||||
"performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
||||
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
||||
default=False,
|
||||
)
|
||||
|
||||
kernel_optimization_level: EnumProperty(
|
||||
name="Kernel Optimization",
|
||||
description="Kernels can be optimized based on scene content. Optimized kernels are requested at the start of a render. "
|
||||
"If optimized kernels are not available, rendering will proceed using generic kernels until the optimized set "
|
||||
"is available in the cache. This can result in additional CPU usage for a brief time (tens of seconds)",
|
||||
default='FULL',
|
||||
items=(
|
||||
('OFF', "Off", "Disable kernel optimization. Slowest rendering, no extra background CPU usage"),
|
||||
('INTERSECT', "Intersection only", "Optimize only intersection kernels. Faster rendering, negligible extra background CPU usage"),
|
||||
('FULL', "Full", "Optimize all kernels. Fastest rendering, may result in extra background CPU usage"),
|
||||
),
|
||||
)
|
||||
|
||||
def find_existing_device_entry(self, device):
|
||||
for device_entry in self.devices:
|
||||
if device_entry.id == device[2] and device_entry.type == device[1]:
|
||||
@@ -1685,7 +1642,7 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
col.label(text="and Windows driver version 101.3430 or newer", icon='BLANK1')
|
||||
elif sys.platform.startswith("linux"):
|
||||
col.label(text="Requires Intel GPU with Xe-HPG architecture and", icon='BLANK1')
|
||||
col.label(text=" - intel-level-zero-gpu version 1.3.23904 or newer", icon='BLANK1')
|
||||
col.label(text=" - Linux driver version xx.xx.23904 or newer", icon='BLANK1')
|
||||
col.label(text=" - oneAPI Level-Zero Loader", icon='BLANK1')
|
||||
elif device_type == 'METAL':
|
||||
col.label(text="Requires Apple Silicon with macOS 12.2 or newer", icon='BLANK1')
|
||||
@@ -1726,12 +1683,10 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
if compute_device_type == 'METAL':
|
||||
import platform
|
||||
# MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
|
||||
# Kernel specialization is only viable on Apple Silicon at present due to relative compilation speed
|
||||
if platform.machine() == 'arm64':
|
||||
col = layout.column()
|
||||
col.use_property_split = True
|
||||
col.prop(self, "kernel_optimization_level")
|
||||
col.prop(self, "use_metalrt")
|
||||
row = layout.row()
|
||||
row.use_property_split = True
|
||||
row.prop(self, "use_metalrt")
|
||||
|
||||
def draw(self, context):
|
||||
self.draw_impl(self.layout, context)
|
||||
|
@@ -193,7 +193,7 @@ class CYCLES_RENDER_PT_sampling_viewport(CyclesButtonsPanel, Panel):
|
||||
|
||||
if cscene.use_preview_adaptive_sampling:
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "preview_samples", text="Max Samples")
|
||||
col.prop(cscene, "preview_samples", text=" Max Samples")
|
||||
col.prop(cscene, "preview_adaptive_min_samples", text="Min Samples")
|
||||
else:
|
||||
layout.prop(cscene, "preview_samples", text="Samples")
|
||||
@@ -255,7 +255,7 @@ class CYCLES_RENDER_PT_sampling_render(CyclesButtonsPanel, Panel):
|
||||
|
||||
col = layout.column(align=True)
|
||||
if cscene.use_adaptive_sampling:
|
||||
col.prop(cscene, "samples", text="Max Samples")
|
||||
col.prop(cscene, "samples", text=" Max Samples")
|
||||
col.prop(cscene, "adaptive_min_samples", text="Min Samples")
|
||||
else:
|
||||
col.prop(cscene, "samples", text="Samples")
|
||||
@@ -364,13 +364,16 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
||||
row.prop(cscene, "seed")
|
||||
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sampling_pattern", text="Pattern")
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sample_offset")
|
||||
|
||||
layout.separator()
|
||||
|
||||
heading = layout.column(align=True, heading="Scrambling Distance")
|
||||
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL'
|
||||
heading.active = cscene.sampling_pattern != 'SOBOL'
|
||||
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
||||
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
||||
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
||||
@@ -380,6 +383,7 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "min_light_bounces")
|
||||
col.prop(cscene, "min_transparent_bounces")
|
||||
col.prop(cscene, "light_sampling_threshold", text="Light Threshold")
|
||||
|
||||
for view_layer in scene.view_layers:
|
||||
if view_layer.samples > 0:
|
||||
@@ -388,43 +392,6 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
||||
break
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Lights"
|
||||
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
scene = context.scene
|
||||
cscene = scene.cycles
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "use_light_tree")
|
||||
sub = col.row()
|
||||
sub.prop(cscene, "light_sampling_threshold", text="Light Threshold")
|
||||
sub.active = not cscene.use_light_tree
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_sampling_debug(CyclesDebugButtonsPanel, Panel):
|
||||
bl_label = "Debug"
|
||||
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
scene = context.scene
|
||||
cscene = scene.cycles
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(cscene, "sampling_pattern", text="Pattern")
|
||||
|
||||
|
||||
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Subdivision"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -987,6 +954,7 @@ class CYCLES_RENDER_PT_passes_light(CyclesButtonsPanel, Panel):
|
||||
col = layout.column(heading="Other", align=True)
|
||||
col.prop(view_layer, "use_pass_emit", text="Emission")
|
||||
col.prop(view_layer, "use_pass_environment")
|
||||
col.prop(view_layer, "use_pass_shadow")
|
||||
col.prop(view_layer, "use_pass_ambient_occlusion", text="Ambient Occlusion")
|
||||
col.prop(cycles_view_layer, "use_pass_shadow_catcher")
|
||||
|
||||
@@ -1864,9 +1832,9 @@ class CYCLES_MATERIAL_PT_settings_surface(CyclesButtonsPanel, Panel):
|
||||
cmat = mat.cycles
|
||||
|
||||
col = layout.column()
|
||||
col.prop(cmat, "displacement_method", text="Displacement")
|
||||
col.prop(cmat, "emission_sampling")
|
||||
col.prop(cmat, "sample_as_light", text="Multiple Importance")
|
||||
col.prop(cmat, "use_transparent_shadow")
|
||||
col.prop(cmat, "displacement_method", text="Displacement")
|
||||
|
||||
def draw(self, context):
|
||||
self.draw_shared(self, context.material)
|
||||
@@ -2360,6 +2328,7 @@ def draw_pause(self, context):
|
||||
|
||||
def get_panels():
|
||||
exclude_panels = {
|
||||
'DATA_PT_area',
|
||||
'DATA_PT_camera_dof',
|
||||
'DATA_PT_falloff_curve',
|
||||
'DATA_PT_light',
|
||||
@@ -2397,9 +2366,7 @@ classes = (
|
||||
CYCLES_RENDER_PT_sampling_render_denoise,
|
||||
CYCLES_RENDER_PT_sampling_path_guiding,
|
||||
CYCLES_RENDER_PT_sampling_path_guiding_debug,
|
||||
CYCLES_RENDER_PT_sampling_lights,
|
||||
CYCLES_RENDER_PT_sampling_advanced,
|
||||
CYCLES_RENDER_PT_sampling_debug,
|
||||
CYCLES_RENDER_PT_light_paths,
|
||||
CYCLES_RENDER_PT_light_paths_max_bounces,
|
||||
CYCLES_RENDER_PT_light_paths_clamping,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user