[Bf-blender-cvs] [dacef592995] temp-sybren-usd-patch-02: USD: install libusd_m.a from usd.cmake instead of from harvesting step
Sybren A. Stüvel
noreply at git.blender.org
Wed Dec 11 16:36:41 CET 2019
Commit: dacef592995773047e63aeab5e4b9b4e0ab5d550
Author: Sybren A. Stüvel
Date: Wed Dec 11 11:11:18 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rBdacef592995773047e63aeab5e4b9b4e0ab5d550
USD: install libusd_m.a from usd.cmake instead of from harvesting step
===================================================================
M build_files/build_environment/cmake/harvest.cmake
M build_files/build_environment/cmake/usd.cmake
===================================================================
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index 94e28eda6b2..cc93db7de64 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -200,11 +200,6 @@ harvest(embree/lib embree/lib "*.a")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
-# Because 'make install' doesn't install the monolithic static library.
-# See https://groups.google.com/d/msg/usd-interest/JgbM0RD8KnY/uHLghBA3BAAJ
-install(
- FILES ${BUILD_DIR}/usd/src/external_usd-build/pxr/libusd_m.a
- DESTINATION ${HARVEST_TARGET}/usd/lib/)
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")
diff --git a/build_files/build_environment/cmake/usd.cmake b/build_files/build_environment/cmake/usd.cmake
index 03c70c23430..f9803b93967 100644
--- a/build_files/build_environment/cmake/usd.cmake
+++ b/build_files/build_environment/cmake/usd.cmake
@@ -78,4 +78,15 @@ if(WIN32)
DEPENDEES install
)
endif()
+else()
+ # USD has two build options. The default build creates lots of small libraries,
+ # whereas the 'monolithic' build produces only a single library. The latter
+ # makes linking simpler, so that's what we use in Blender. However, running
+ # 'make install' in the USD sources doesn't install the static library in that
+ # case (only the shared library). As a result, we need to grab the `libusd_m.a`
+ # file from the build directory instead of from the install directory.
+ ExternalProject_Add_Step(external_usd after_install
+ COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/libusd_m.a ${HARVEST_TARGET}/usd/lib/libusd_m.a
+ DEPENDEES install
+ )
endif()
More information about the Bf-blender-cvs
mailing list