[Bf-blender-cvs] [ecc61b4f026] tmp_libupdate_34: deps/windows: add backport USD 20.08 patch for openvdb
Ray Molenkamp
noreply at git.blender.org
Wed Aug 24 23:02:29 CEST 2022
Commit: ecc61b4f026dd7dd25544bc371ffb9fd2ae4977a
Author: Ray Molenkamp
Date: Wed Aug 24 15:02:23 2022 -0600
Branches: tmp_libupdate_34
https://developer.blender.org/rBecc61b4f026dd7dd25544bc371ffb9fd2ae4977a
deps/windows: add backport USD 20.08 patch for openvdb
code that uses OpenVDB needs _USE_MATH_DEFINES defined
or it will have build errors on windows.
Based on https://github.com/PixarAnimationStudios/USD/commit/33fd2b05117fda0c908a450d527d6d5db122f1cc
===================================================================
M build_files/build_environment/patches/usd.diff
===================================================================
diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff
index f627d2726ab..881d856ca25 100644
--- a/build_files/build_environment/patches/usd.diff
+++ b/build_files/build_environment/patches/usd.diff
@@ -127,3 +127,20 @@ diff -Naur orig/cmake/macros/Private.cmake external_usd/cmake/macros/Private.cma
set(LIBRARY_NAME "_${NAME}_d")
else()
set(LIBRARY_NAME "_${NAME}")
+diff --git a/pxr/imaging/hioOpenVDB/CMakeLists.txt b/pxr/imaging/hioOpenVDB/CMakeLists.txt
+index e3db1d1319..2a2dfd5e72 100644
+--- a/pxr/imaging/hioOpenVDB/CMakeLists.txt
++++ b/pxr/imaging/hioOpenVDB/CMakeLists.txt
+@@ -7,6 +7,12 @@ if (NOT ${PXR_BUILD_GPU_SUPPORT})
+ return()
+ 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
\ No newline at end of file
More information about the Bf-blender-cvs
mailing list