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-14 21:12:14 +0300
committerRay Molenkamp <github@lazydodo.com>2020-01-21 19:46:53 +0300
commitce92e3d5532c3d5e26c7a2671ecc5997790f792f (patch)
tree11b2d2bbbf39d8159c4633e635e5b93a1092ab57 /build_files/cmake/macros.cmake
parent8d163d597652aec1f2ca926ba978447dd8476619 (diff)
Fix: Building with clang on windows.
The USD landing broke building with clang on windows due to a couple of reasons: 1) Some incompatibilities in their headers [1] only one of them was important for us and is included in our patchset now. 2) clangs lld wanted the full path to the libusd_b library when using the whole archive link option, while msvc can figure it out from just the library name. Tested with clang/msvc and msbuild and ninja generators [1] https://github.com/PixarAnimationStudios/USD/issues/1030
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 3fe9ae90a79..23ed5b6cbfb 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -481,10 +481,10 @@ function(setup_liblinks
# Source: https://github.com/PixarAnimationStudios/USD/blob/master/BUILDING.md#linking-whole-archives
if(WIN32)
target_link_libraries(${target} ${USD_LIBRARIES})
- set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /WHOLEARCHIVE:libusd_m_d.lib")
- set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /WHOLEARCHIVE:libusd_m.lib")
- set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /WHOLEARCHIVE:libusd_m.lib")
- set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /WHOLEARCHIVE:libusd_m.lib")
+ set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /WHOLEARCHIVE:${USD_DEBUG_LIB}")
+ set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /WHOLEARCHIVE:${USD_RELEASE_LIB}")
+ set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /WHOLEARCHIVE:${USD_RELEASE_LIB}")
+ set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /WHOLEARCHIVE:${USD_RELEASE_LIB}")
elseif(CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(${target} -Wl,--whole-archive ${USD_LIBRARIES} -Wl,--no-whole-archive)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")