Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-01-16 23:11:07 +0300
committerRay Molenkamp <github@lazydodo.com>2020-01-21 19:47:10 +0300
commit4db9562246b36d0d0d18a3f1b33b87f1d91fe146 (patch)
tree64f7b5c5c45adccc9b8080eb0f53417792966001 /build_files
parentce92e3d5532c3d5e26c7a2671ecc5997790f792f (diff)
libs/windows: Prevent USD exports from leaking into blender binary.
Even though we build USD as static, it still feels the need to mark its symbols with declspec(dllexport) which means the blender binary now exports these symbols. this patch fixes that unwanted behaviour, however USD libs still need to rebuild before this becomes visible in the blender binary Differential Revision: https://developer.blender.org/D6563 Reviewed By: sybren
Diffstat (limited to 'build_files')
-rw-r--r--build_files/build_environment/patches/usd.diff16
1 files changed, 16 insertions, 0 deletions
diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff
index 0a98fa220b2..6302f13796b 100644
--- a/build_files/build_environment/patches/usd.diff
+++ b/build_files/build_environment/patches/usd.diff
@@ -121,3 +121,19 @@ diff -Naur external_usd_orig/pxr/base/lib/tf/preprocessorUtils.h external_usd/px
#define TF_PP_IS_TUPLE(sequence) \
BOOST_VMD_IS_TUPLE(sequence)
#else
+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
+@@ -996,6 +996,12 @@
+ foreach(lib ${PXR_OBJECT_LIBS})
+ string(TOUPPER ${lib} uppercaseName)
+ list(APPEND exports "${uppercaseName}_EXPORTS=1")
++ # When building for blender, we do NOT want to export all symbols on windows.
++ # This is a dirty hack, but USD makes it impossible to do the right thing
++ # with the default options exposed.
++ if (WIN32)
++ list(APPEND exports "PXR_STATIC=1")
++ endif()
+ endforeach()
+ foreach(lib ${PXR_OBJECT_LIBS})
+ set(objects "${objects};\$<TARGET_OBJECTS:${lib}>")