[Bf-blender-cvs] [80953aed333] blender-v2.83-release: Fix CMake using different OpenEXR / USD includes and libraries in some cases

Brecht Van Lommel noreply at git.blender.org
Tue May 12 21:54:53 CEST 2020


Commit: 80953aed333051f7d2b319e3e087add7a2800956
Author: Brecht Van Lommel
Date:   Tue May 12 10:46:16 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB80953aed333051f7d2b319e3e087add7a2800956

Fix CMake using different OpenEXR / USD includes and libraries in some cases

Search for all potential library names in each directory, otherwise e.g.
libImath-2_2.a from a system directory will be preferred over libImath.a even
if we specified a directory.

===================================================================

M	build_files/cmake/Modules/FindOpenEXR.cmake
M	build_files/cmake/Modules/FindUSD.cmake

===================================================================

diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
index 2038726863f..3cf559a5da1 100644
--- a/build_files/cmake/Modules/FindOpenEXR.cmake
+++ b/build_files/cmake/Modules/FindOpenEXR.cmake
@@ -104,6 +104,7 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
   FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
     NAMES
       ${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
+    NAMES_PER_DIR
     HINTS
       ${_openexr_SEARCH_DIRS}
     PATH_SUFFIXES
diff --git a/build_files/cmake/Modules/FindUSD.cmake b/build_files/cmake/Modules/FindUSD.cmake
index 97830af1dd9..043a10ffa98 100644
--- a/build_files/cmake/Modules/FindUSD.cmake
+++ b/build_files/cmake/Modules/FindUSD.cmake
@@ -43,6 +43,7 @@ FIND_PATH(USD_INCLUDE_DIR
 FIND_LIBRARY(USD_LIBRARY
   NAMES
     usd_m usd_ms
+  NAMES_PER_DIR
   HINTS
     ${_usd_SEARCH_DIRS}
   PATH_SUFFIXES



More information about the Bf-blender-cvs mailing list