[Bf-blender-cvs] [78383f7a9f9] master: Fix: USD Build error on windows
Ray Molenkamp
noreply at git.blender.org
Tue Mar 3 17:04:37 CET 2020
Commit: 78383f7a9f9c3a2b3cc5f6c1ea0834cd7278317c
Author: Ray Molenkamp
Date: Tue Mar 3 09:04:31 2020 -0700
Branches: master
https://developer.blender.org/rB78383f7a9f9c3a2b3cc5f6c1ea0834cd7278317c
Fix: USD Build error on windows
USD is being included before the blender headers.
USD includes TBB, which includes the windows headers
which define rad2 as a constant conflicting with a field
with that exact name in the MetaElem dna struct.
Added `-DWIN32_LEAN_AND_MEAN` to keep the windows headers
from defining rad2.
===================================================================
M source/blender/usd/CMakeLists.txt
===================================================================
diff --git a/source/blender/usd/CMakeLists.txt b/source/blender/usd/CMakeLists.txt
index adaf05cd716..d85b3cfe4e5 100644
--- a/source/blender/usd/CMakeLists.txt
+++ b/source/blender/usd/CMakeLists.txt
@@ -26,7 +26,7 @@ if(UNIX AND NOT APPLE)
add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH)
endif()
if(WIN32)
- add_definitions(-DNOMINMAX)
+ add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
endif()
add_definitions(-DPXR_STATIC)
More information about the Bf-blender-cvs
mailing list