diff options
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/cmake/boost.cmake | 6 | ||||
-rw-r--r-- | build_files/build_environment/cmake/ffmpeg.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/cmake/openvdb.cmake | 18 | ||||
-rw-r--r-- | build_files/build_environment/cmake/versions.cmake | 1 | ||||
-rwxr-xr-x | build_files/build_environment/install_deps.sh | 10 | ||||
-rw-r--r-- | build_files/build_environment/patches/hdf5.diff | 11 | ||||
-rw-r--r-- | build_files/build_environment/patches/openvdb.diff | 115 | ||||
-rw-r--r-- | build_files/build_environment/patches/usd.diff | 71 |
8 files changed, 108 insertions, 126 deletions
diff --git a/build_files/build_environment/cmake/boost.cmake b/build_files/build_environment/cmake/boost.cmake index 22b5f33e690..d01c62b679c 100644 --- a/build_files/build_environment/cmake/boost.cmake +++ b/build_files/build_environment/cmake/boost.cmake @@ -56,6 +56,12 @@ if(WITH_BOOST_PYTHON) --with-python --user-config=${JAM_FILE} ) + if(WIN32 AND BUILD_MODE STREQUAL Debug) + set(BOOST_PYTHON_OPTIONS + ${BOOST_PYTHON_OPTIONS} + define=BOOST_DEBUG_PYTHON + ) + endif() endif() set(BOOST_OPTIONS diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake index 164997b9aa5..7fbd613b25d 100644 --- a/build_files/build_environment/cmake/ffmpeg.cmake +++ b/build_files/build_environment/cmake/ffmpeg.cmake @@ -95,8 +95,6 @@ ExternalProject_Add(external_ffmpeg --disable-version3 --disable-debug --enable-optimizations - --disable-sse - --disable-ssse3 --enable-ffplay --disable-openssl --disable-securetransport diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake index f432ade7dd1..f27d3f408a8 100644 --- a/build_files/build_environment/cmake/openvdb.cmake +++ b/build_files/build_environment/cmake/openvdb.cmake @@ -20,6 +20,14 @@ 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 -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING} -DBoost_USE_MULTITHREADED=ON @@ -42,8 +50,10 @@ set(OPENVDB_EXTRA_ARGS -DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib # All libs live in openexr, even the ilmbase ones -DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib - -DOPENVDB_CORE_SHARED=Off + -DOPENVDB_CORE_SHARED=${OPENVDB_SHARED} + -DOPENVDB_CORE_STATIC=${OPENVDB_STATIC} -DOPENVDB_BUILD_BINARIES=Off + -DCMAKE_DEBUG_POSTFIX=_d ) if(WIN32) @@ -87,13 +97,15 @@ if(WIN32) if(BUILD_MODE STREQUAL Release) ExternalProject_Add_Step(openvdb after_install COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include - COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib + 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 DEPENDEES install ) endif() if(BUILD_MODE STREQUAL Debug) ExternalProject_Add_Step(openvdb after_install - COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib + 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 DEPENDEES install ) endif() diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 30a0b1184c2..eb5df8204b5 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -312,6 +312,7 @@ set(NASM_HASH f4fd1329b1713e1ccd34b2fc121c4bcd278c9f91cc4cb205ae8fcd2e4728dd14) set(XR_OPENXR_SDK_VERSION 1.0.8) set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz) set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07) + set(ISPC_VERSION v1.13.0) set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz) set(ISPC_HASH 4bf5e8d0020c4b9980faa702c1a6f25f) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 130173d7f01..43606f49c78 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1087,7 +1087,7 @@ 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). * libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp. - * libsdl2, libglew, [libgmp], [libglewmx].\"" + * libsdl2, libglew, [libgmp], [libglewmx], fontconfig.\"" DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES: @@ -3654,7 +3654,7 @@ install_DEB() { THEORA_DEV="libtheora-dev" _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ - git libfreetype6-dev libx11-dev flex bison libxxf86vm-dev \ + git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \ libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ @@ -4320,7 +4320,7 @@ install_RPM() { OGG_DEV="libogg-devel" THEORA_DEV="libtheora-devel" - _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison \ + _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison fontconfig-devel \ libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \ libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ @@ -4898,7 +4898,7 @@ install_ARCH() { BASE_DEVEL=`pacman -Sgq base-devel | sed -e 's/^gcc$/gcc-multilib/g' | paste -s -d' '` fi - _packages="$BASE_DEVEL git cmake \ + _packages="$BASE_DEVEL git cmake fontconfig \ libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \ $OPENJPEG_DEV $VORBIS_DEV $OGG_DEV $THEORA_DEV yasm sdl2 fftw \ libxml2 yaml-cpp tinyxml python-requests jemalloc gmp" @@ -5577,7 +5577,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 *CYCLES*" - _buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -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*" _1="-D WITH_CODEC_SNDFILE=ON" diff --git a/build_files/build_environment/patches/hdf5.diff b/build_files/build_environment/patches/hdf5.diff deleted file mode 100644 index cb84625810d..00000000000 --- a/build_files/build_environment/patches/hdf5.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- UserMacros.cmake -+++ UserMacros.cmake -@@ -16,6 +16,8 @@ - if (BUILD_USER_DEFINED_LIBS) - MACRO_USER_DEFINED_LIBS () - endif (BUILD_USER_DEFINED_LIBS) -+ -+include(Config/cmake/usermacros/windows_mt.cmake) - #----------------------------------------------------------------------------- - #------------------- E X A M P L E E N D ----------------------------------- - #----------------------------------------------------------------------------- diff --git a/build_files/build_environment/patches/openvdb.diff b/build_files/build_environment/patches/openvdb.diff index a9360cbafd3..db4506025ea 100644 --- a/build_files/build_environment/patches/openvdb.diff +++ b/build_files/build_environment/patches/openvdb.diff @@ -1,6 +1,6 @@ diff -Naur orig/cmake/FindIlmBase.cmake openvdb/cmake/FindIlmBase.cmake ---- orig/cmake/FindIlmBase.cmake 2019-12-06 13:11:33 -0700 -+++ openvdb/cmake/FindIlmBase.cmake 2020-01-16 09:06:32 -0700 +--- orig/cmake/FindIlmBase.cmake 2019-12-06 12:11:33 -0700 ++++ openvdb/cmake/FindIlmBase.cmake 2020-08-12 12:48:44 -0600 @@ -225,6 +225,12 @@ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib" @@ -15,8 +15,8 @@ diff -Naur orig/cmake/FindIlmBase.cmake openvdb/cmake/FindIlmBase.cmake if(ILMBASE_USE_STATIC_LIBS) list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES diff -Naur orig/cmake/FindOpenEXR.cmake openvdb/cmake/FindOpenEXR.cmake ---- orig/cmake/FindOpenEXR.cmake 2019-12-06 13:11:33 -0700 -+++ openvdb/cmake/FindOpenEXR.cmake 2020-01-16 09:06:39 -0700 +--- orig/cmake/FindOpenEXR.cmake 2019-12-06 12:11:33 -0700 ++++ openvdb/cmake/FindOpenEXR.cmake 2020-08-12 12:48:44 -0600 @@ -218,6 +218,12 @@ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib" @@ -31,9 +31,20 @@ diff -Naur orig/cmake/FindOpenEXR.cmake openvdb/cmake/FindOpenEXR.cmake if(OPENEXR_USE_STATIC_LIBS) list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES diff -Naur orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt ---- orig/openvdb/CMakeLists.txt 2019-12-06 13:11:33 -0700 -+++ openvdb/openvdb/CMakeLists.txt 2020-01-16 08:56:25 -0700 -@@ -193,11 +193,12 @@ +--- orig/openvdb/CMakeLists.txt 2019-12-06 12:11:33 -0700 ++++ openvdb/openvdb/CMakeLists.txt 2020-08-12 14:12:26 -0600 +@@ -105,7 +105,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) +@@ -193,6 +195,7 @@ if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) add_definitions(-DBOOST_ALL_NO_LIB) endif() @@ -41,33 +52,69 @@ diff -Naur orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt endif() # @todo Should be target definitions - if(WIN32) -- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) -+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB) - endif() - - ##### Core library configuration -diff -Naur orig/openvdb/cmd/CMakeLists.txt openvdb/openvdb/cmd/CMakeLists.txt ---- orig/openvdb/cmd/CMakeLists.txt 2019-12-06 13:11:33 -0700 -+++ openvdb/openvdb/cmd/CMakeLists.txt 2020-01-16 08:56:25 -0700 -@@ -53,7 +53,7 @@ - endif() - - if(WIN32) -- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) -+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB) - endif() - - # rpath handling -diff -Naur orig/openvdb/unittest/CMakeLists.txt openvdb/openvdb/unittest/CMakeLists.txt ---- orig/openvdb/unittest/CMakeLists.txt 2019-12-06 13:11:33 -0700 -+++ openvdb/openvdb/unittest/CMakeLists.txt 2020-01-16 08:56:25 -0700 -@@ -49,7 +49,7 @@ - endif() +@@ -383,7 +386,12 @@ + # imported targets. - if(WIN32) -- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) -+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB) + if(OPENVDB_CORE_SHARED) +- add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES}) ++ if(WIN32) ++ configure_file(version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) ++ add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) ++ else() ++ add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES}) ++ endif() endif() - ##### VDB unit tests + if(OPENVDB_CORE_STATIC) +diff -Naur orig/openvdb/version.rc.in openvdb/openvdb/version.rc.in +--- orig/openvdb/version.rc.in 1969-12-31 17:00:00 -0700 ++++ openvdb/openvdb/version.rc.in 2020-08-12 14:15:01 -0600 +@@ -0,0 +1,48 @@ ++#include <winver.h> ++ ++#define VER_FILEVERSION @OpenVDB_MAJOR_VERSION@,@OpenVDB_MINOR_VERSION@,@OpenVDB_PATCH_VERSION@,0 ++#define VER_FILEVERSION_STR "@OpenVDB_MAJOR_VERSION@.@OpenVDB_MINOR_VERSION@.@OpenVDB_PATCH_VERSION@.0\0" ++ ++#define VER_PRODUCTVERSION @OpenVDB_MAJOR_VERSION@,@OpenVDB_MINOR_VERSION@,@OpenVDB_PATCH_VERSION@,0 ++#define VER_PRODUCTVERSION_STR "@OpenVDB_MAJOR_VERSION@.@OpenVDB_MINOR_VERSION@\0" ++ ++#ifndef DEBUG ++#define VER_DEBUG 0 ++#else ++#define VER_DEBUG VS_FF_DEBUG ++#endif ++ ++VS_VERSION_INFO VERSIONINFO ++FILEVERSION VER_FILEVERSION ++PRODUCTVERSION VER_PRODUCTVERSION ++FILEFLAGSMASK VS_FFI_FILEFLAGSMASK ++FILEFLAGS (VER_DEBUG) ++FILEOS VOS__WINDOWS32 ++FILETYPE VFT_DLL ++FILESUBTYPE VFT2_UNKNOWN ++BEGIN ++ BLOCK "StringFileInfo" ++ BEGIN ++ BLOCK "040904E4" ++ BEGIN ++ VALUE "FileDescription", "OpenVDB" ++ VALUE "FileVersion", VER_FILEVERSION_STR ++ VALUE "InternalName", "OpenVDB" ++ VALUE "ProductName", "OpenVDB" ++ VALUE "ProductVersion", VER_PRODUCTVERSION_STR ++ END ++ END ++ ++ BLOCK "VarFileInfo" ++ BEGIN ++ /* The following line should only be modified for localized versions. */ ++ /* It consists of any number of WORD,WORD pairs, with each pair */ ++ /* describing a language,codepage combination supported by the file. */ ++ /* */ ++ /* For example, a file might have values "0x409,1252" indicating that it */ ++ /* supports English language (0x409) in the Windows ANSI codepage (1252). */ ++ ++ VALUE "Translation", 0x409, 1252 ++ ++ END ++END diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff index fe767829a70..27b4955f849 100644 --- a/build_files/build_environment/patches/usd.diff +++ b/build_files/build_environment/patches/usd.diff @@ -10,77 +10,6 @@ diff -x .git -ur usd.orig/cmake/defaults/Packages.cmake external_usd/cmake/defau add_definitions(${TBB_DEFINITIONS}) # --math -diff -x .git -ur usd.orig/pxr/base/plug/initConfig.cpp external_usd/pxr/base/plug/initConfig.cpp ---- usd.orig/pxr/base/plug/initConfig.cpp.orig 2020-06-12 17:20:07.478199779 +0200 -+++ external_usd/pxr/base/plug/initConfig.cpp 2020-06-12 17:25:28.648588552 +0200 -@@ -69,10 +69,40 @@ - - ARCH_CONSTRUCTOR(Plug_InitConfig, 2, void) - { -+ /* The contents of this constructor have been moved to usd_initialise_plugin_path(...) */ -+} -+ -+}; // end of anonymous namespace -+ -+/** -+ * The contents of this function used to be in the static constructor Plug_InitConfig. -+ * This static constructor made it impossible for Blender to pass a path to the USD -+ * library at runtime, as the constructor would run before Blender's main() function. -+ * -+ * This function is wrapped in a C function of the same name (defined below), -+ * so that it can be called from Blender's main() function. -+ * -+ * The datafiles_usd_path path is used to point to the USD plugin path when Blender -+ * has been installed. The fallback_usd_path path should point to the build-time -+ * location of the USD plugin files so that Blender can be run on a development machine -+ * without requiring an installation step. -+ */ -+void -+usd_initialise_plugin_path(const char *datafiles_usd_path) -+{ - std::vector<std::string> result; - - std::vector<std::string> debugMessages; - -+ // Add Blender-specific paths. They MUST end in a slash, or symlinks will not be treated as directory. -+ if (datafiles_usd_path != NULL && datafiles_usd_path[0] != '\0') { -+ std::string datafiles_usd_path_str(datafiles_usd_path); -+ if (datafiles_usd_path_str.back() != '/') { -+ datafiles_usd_path_str += "/"; -+ } -+ result.push_back(datafiles_usd_path_str); -+ } -+ - // Determine the absolute path to the Plug shared library. Any relative - // paths specified in the plugin search path will be anchored to this - // directory, to allow for relocatability. Note that this can fail when pxr -@@ -114,9 +144,24 @@ - _AppendPathList(&result, installLocation, binaryPath); - #endif // PXR_INSTALL_LOCATION - -- Plug_SetPaths(result, debugMessages); --} -+ if (!TfGetenv("PXR_PATH_DEBUG").empty()) { -+ printf("USD Plugin paths: (%zu in total):\n", result.size()); -+ for(const std::string &path : result) { -+ printf(" %s\n", path.c_str()); -+ } -+ } - -+ Plug_SetPaths(result, debugMessages); - } - - PXR_NAMESPACE_CLOSE_SCOPE -+ -+/* Workaround to make it possible to pass a path at runtime to USD. */ -+extern "C" { -+void -+usd_initialise_plugin_path( -+ const char *datafiles_usd_path) -+{ -+ PXR_NS::usd_initialise_plugin_path(datafiles_usd_path); -+} -+} diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros/Public.cmake --- external_usd_base/cmake/macros/Public.cmake 2019-10-24 14:39:53 -0600 +++ external_usd/cmake/macros/Public.cmake 2020-01-11 13:33:29 -0700 |