[Bf-blender-cvs] [8f56822009c] tmp_lib_update_32: wip: updates to most libs

Ray Molenkamp noreply at git.blender.org
Sun Feb 13 02:05:36 CET 2022


Commit: 8f56822009c497cf65229c8273d0f4cb804a837b
Author: Ray Molenkamp
Date:   Sat Feb 12 17:31:11 2022 -0700
Branches: tmp_lib_update_32
https://developer.blender.org/rB8f56822009c497cf65229c8273d0f4cb804a837b

wip: updates to most libs

===================================================================

M	build_files/build_environment/CMakeLists.txt
M	build_files/build_environment/cmake/alembic.cmake
M	build_files/build_environment/cmake/boost.cmake
A	build_files/build_environment/cmake/boost_build_options.cmake
M	build_files/build_environment/cmake/download.cmake
M	build_files/build_environment/cmake/harvest.cmake
A	build_files/build_environment/cmake/imath.cmake
M	build_files/build_environment/cmake/jpeg.cmake
D	build_files/build_environment/cmake/nanovdb.cmake
M	build_files/build_environment/cmake/opencolorio.cmake
M	build_files/build_environment/cmake/openexr.cmake
M	build_files/build_environment/cmake/openimageio.cmake
M	build_files/build_environment/cmake/openjpeg.cmake
M	build_files/build_environment/cmake/opensubdiv.cmake
M	build_files/build_environment/cmake/openvdb.cmake
M	build_files/build_environment/cmake/options.cmake
M	build_files/build_environment/cmake/osl.cmake
A	build_files/build_environment/cmake/pystring.cmake
M	build_files/build_environment/cmake/usd.cmake
M	build_files/build_environment/cmake/versions.cmake
A	build_files/build_environment/patches/cmakelists_pystring.txt
M	build_files/build_environment/patches/ispc.diff
M	build_files/build_environment/patches/openvdb.diff
M	build_files/build_environment/patches/osl.diff
M	build_files/build_environment/patches/usd.diff
M	build_files/build_environment/windows/build_deps.cmd
M	build_files/cmake/config/blender_full.cmake
M	build_files/cmake/config/blender_lite.cmake
M	build_files/cmake/config/blender_release.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	source/blender/imbuf/intern/openexr/openexr_api.cpp
M	source/blender/io/usd/CMakeLists.txt
M	source/blender/io/usd/intern/usd_reader_light.cc
M	source/blender/io/usd/intern/usd_reader_stage.cc
M	source/blender/io/usd/intern/usd_reader_xform.cc
M	source/blender/io/usd/intern/usd_writer_light.cc
M	source/blender/io/usd/intern/usd_writer_material.cc
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index 9a264e738c7..625f2f518c9 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -45,8 +45,9 @@ cmake_minimum_required(VERSION 3.5)
 
 include(ExternalProject)
 include(cmake/check_software.cmake)
-include(cmake/options.cmake)
 include(cmake/versions.cmake)
+include(cmake/options.cmake)
+include(cmake/boost_build_options.cmake)
 include(cmake/download.cmake)
 
 if(ENABLE_MINGW64)
@@ -62,6 +63,7 @@ include(cmake/png.cmake)
 include(cmake/jpeg.cmake)
 include(cmake/blosc.cmake)
 include(cmake/pthreads.cmake)
+include(cmake/imath.cmake)
 include(cmake/openexr.cmake)
 include(cmake/brotli.cmake)
 include(cmake/freetype.cmake)
@@ -91,7 +93,6 @@ endif()
 include(cmake/osl.cmake)
 include(cmake/tbb.cmake)
 include(cmake/openvdb.cmake)
-include(cmake/nanovdb.cmake)
 include(cmake/python.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"))
@@ -118,6 +119,7 @@ endif()
 
 # OpenColorIO and dependencies.
 include(cmake/expat.cmake)
+include(cmake/pystring.cmake)
 include(cmake/yamlcpp.cmake)
 include(cmake/opencolorio.cmake)
 
diff --git a/build_files/build_environment/cmake/alembic.cmake b/build_files/build_environment/cmake/alembic.cmake
index 9bc5a3778e2..984220b9142 100644
--- a/build_files/build_environment/cmake/alembic.cmake
+++ b/build_files/build_environment/cmake/alembic.cmake
@@ -17,30 +17,16 @@
 # ***** END GPL LICENSE BLOCK *****
 
 set(ALEMBIC_EXTRA_ARGS
-  -DBUILDSTATIC=ON
-  -DLINKSTATIC=ON
-  -DILMBASE_ROOT=${LIBDIR}/openexr
-  -DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-  -DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-  -DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-  -DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-  -DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-  -DALEMBIC_ILMBASE_IEXMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IexMath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-  -DUSE_PYILMBASE=0
-  -DUSE_PYALEMBIC=0
-  -DUSE_ARNOLD=0
-  -DUSE_MAYA=0
-  -DUSE_PRMAN=0
-  -DUSE_HDF5=Off
-  -DUSE_STATIC_HDF5=Off
-  -DUSE_TESTS=Off
-  -DALEMBIC_NO_OPENGL=1
+  -DImath_ROOT=${LIBDIR}/imath
+  -DUSE_PYALEMBIC=OFF
+  -DUSE_ARNOLD=OFF
+  -DUSE_MAYA=OFF
+  -DUSE_PRMAN=OFF
+  -DUSE_HDF5=OFF
+  -DUSE_TESTS=OFF
   -DUSE_BINARIES=ON
-  -DALEMBIC_ILMBASE_LINK_STATIC=On
+  -DALEMBIC_ILMBASE_LINK_STATIC=OFF
   -DALEMBIC_SHARED_LIBS=OFF
-  -DGLUT_INCLUDE_DIR=""
-  -DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-  -DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
 )
 
 ExternalProject_Add(external_alembic
@@ -71,6 +57,5 @@ endif()
 
 add_dependencies(
   external_alembic
-  external_zlib
   external_openexr
 )
diff --git a/build_files/build_environment/cmake/boost.cmake b/build_files/build_environment/cmake/boost.cmake
index f2944a41af8..94e59bcbd1a 100644
--- a/build_files/build_environment/cmake/boost.cmake
+++ b/build_files/build_environment/cmake/boost.cmake
@@ -16,23 +16,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-set(BOOST_ADDRESS_MODEL 64)
-
-if(BLENDER_PLATFORM_ARM)
-  set(BOOST_ARCHITECTURE arm)
-else()
-  set(BOOST_ARCHITECTURE x86)
-endif()
-
 if(WIN32)
-  if(MSVC_VERSION GREATER_EQUAL 1920) # 2019
-    set(BOOST_TOOLSET toolset=msvc-14.2)
-    set(BOOST_COMPILER_STRING -vc142)
-  else() # 2017
-    set(BOOST_TOOLSET toolset=msvc-14.1)
-    set(BOOST_COMPILER_STRING -vc141)
-  endif()
-
   set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
   set(BOOST_BUILD_COMMAND b2)
   set(BOOST_BUILD_OPTIONS runtime-link=shared )
@@ -52,11 +36,6 @@ else()
   set(BOOST_BUILD_COMMAND ./b2)
   set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
   set(BOOST_PATCH_COMMAND echo .)
-  if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-    set(BOOST_ADDRESS_MODEL 64)
-  else()
-    set(BOOST_ADDRESS_MODEL 32)
-  endif()
 endif()
 
 if(WITH_BOOST_PYTHON)
diff --git a/build_files/build_environment/cmake/boost_build_options.cmake b/build_files/build_environment/cmake/boost_build_options.cmake
new file mode 100644
index 00000000000..bcc0d26f096
--- /dev/null
+++ b/build_files/build_environment/cmake/boost_build_options.cmake
@@ -0,0 +1,46 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(BOOST_ADDRESS_MODEL 64)
+if(BLENDER_PLATFORM_ARM)
+  set(BOOST_ARCHITECTURE arm)
+else()
+  set(BOOST_ARCHITECTURE x86)
+endif()
+
+if(WIN32)
+  if(MSVC_VERSION GREATER_EQUAL 1920) # 2019
+    set(BOOST_TOOLSET toolset=msvc-14.2)
+    set(BOOST_COMPILER_STRING -vc142)
+  else() # 2017
+    set(BOOST_TOOLSET toolset=msvc-14.1)
+    set(BOOST_COMPILER_STRING -vc141)
+  endif()
+endif()
+
+set(DEFAULT_BOOST_FLAGS
+  -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
+  -DBoost_ADDITIONAL_VERSIONS=${BOOST_VERSION_SHORT}
+  -DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
+)
diff --git a/build_files/build_environment/cmake/download.cmake b/build_files/build_environment/cmake/download.cmake
index 9b58d4483c3..432f46d79aa 100644
--- a/build_files/build_environment/cmake/download.cmake
+++ b/build_files/build_environment/cmake/download.cmake
@@ -97,3 +97,5 @@ download_source(FLEX)
 download_source(BROTLI)
 download_source(FMT)
 download_source(ROBINMAP)
+download_source(IMATH)
+download_source(PYSTRING)
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index 0e68e720b44..6ede6c0a262 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -30,8 +30,8 @@ if(WIN32)
 if(BUILD_MODE STREQUAL Release)
   add_custom_target(Harvest_Release_Results
     COMMAND # jpeg rename libfile + copy include
-        ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
-        ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/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
         ${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/ &&
@@ -96,8 +96,8 @@ harvest(gmp/include gmp/include "*.h")
 harvest(gmp/lib gmp/lib "*.a")
 harvest(jemalloc/include jemalloc/include "*.h")
 harvest(jemalloc/lib jemalloc/lib "*.a")
-harvest(jpg/include jpeg/include "*.h")
-harvest(jpg/lib jpeg/lib "libjpeg.a")
+harvest(jpeg/include jpeg/include "*.h")
+harvest(jpeg/lib jpeg/lib "libjpeg.a")
 harvest(lame/lib ffmpeg/lib "*.a")
 harvest(llvm/bin llvm/bin "clang-format")
 if(BUILD_CLANG_TOOLS)
diff --git a/build_files/build_environment/cmake/imath.cmake b/build_files/build_environment/cmake/imath.cmake
new file mode 100644
index 00000000000..a1887cc5f0b
--- /dev/null
+++ b/build_files/build_environment/cmake/imath.cmake
@@ -0,0 +1,40 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+
+set(IMATH_EXTRA_ARGS
+  -DBUILD_SHARED_LIBS=OFF
+  -DBUILD_TESTING=OFF
+)
+
+ExternalProject_Add(external_imath
+  URL file://${PACKAGE_DIR}/${IMATH_FILE}
+  DOWNLOAD_DIR ${DOWNLOAD_DIR}
+  URL_HASH ${IMATH_HASH_TYPE}=${IMATH_HASH}
+  PREFIX ${BUILD_DIR}/imath
+  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/imath ${DEFAULT_CMAKE_FLAGS} ${IMATH_EXTRA_ARGS}
+  INSTALL_DIR ${LIBDIR}/imath
+)
+
+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
+    DEPENDEES install
+  )
+endif()
diff --git a/build_files/build_environment/cmake/jpeg.cmake b/build_files/build_environment/cmake/jpeg.cmake
index d9eca5ed5cd..5e65d8697de 100644
--- a/build_files/build_environment/cmake/jpeg.cmake
+++ b/build_files/build_environment/cmake/jpeg.cmake
@@ -18,44 +18,52 @@
 
 if(WIN32)
   # cmake for windows
-  set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON  -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
+  set(JPEG_EXTRA_ARGS
+   

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list