diff options
author | Stefano Bonicatti <smjert> | 2020-06-19 16:19:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-06-19 16:42:33 +0300 |
commit | 59b523c3c98ece3c186354c3ae5300ae0a7c6b79 (patch) | |
tree | ac54a8878d3a0cf2123e4c794699d638aba9692f /source/blender/io/usd/CMakeLists.txt | |
parent | 697b1736ef0549ab84b7e62d599bae85d510540d (diff) |
Fix build with USD, Clang and Linux
The important distinction for the linker flags is not between GCC and Clang,
but between the macOS and Linux.
Differential Revision: https://developer.blender.org/D8023
Diffstat (limited to 'source/blender/io/usd/CMakeLists.txt')
-rw-r--r-- | source/blender/io/usd/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/usd/CMakeLists.txt b/source/blender/io/usd/CMakeLists.txt index fc4f45cdef8..19e16a5b328 100644 --- a/source/blender/io/usd/CMakeLists.txt +++ b/source/blender/io/usd/CMakeLists.txt @@ -100,10 +100,10 @@ endif() # Source: https://github.com/PixarAnimationStudios/USD/blob/master/BUILDING.md#linking-whole-archives if(WIN32) target_link_libraries(bf_usd INTERFACE ${USD_LIBRARIES}) -elseif(CMAKE_COMPILER_IS_GNUCXX) - target_link_libraries(bf_usd INTERFACE "-Wl,--whole-archive ${USD_LIBRARIES} -Wl,--no-whole-archive ${TBB_LIBRARIES}") -elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") +elseif(APPLE) target_link_libraries(bf_usd INTERFACE -Wl,-force_load ${USD_LIBRARIES}) +elseif(UNIX) + target_link_libraries(bf_usd INTERFACE "-Wl,--whole-archive ${USD_LIBRARIES} -Wl,--no-whole-archive ${TBB_LIBRARIES}") else() message(FATAL_ERROR "Unknown how to link USD with your compiler ${CMAKE_CXX_COMPILER_ID}") endif() |