diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-08-27 12:55:40 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-08-27 12:55:40 +0300 |
commit | 91aeb452ab251b307311fe869e8e14df945ec6bc (patch) | |
tree | ffbe973c1ba79ea993d9966656ff53ebceed8aee /build_files | |
parent | 54b47da56596298a6d880d334a2c403862855ae9 (diff) |
Fix: FindEmbree.cmake looking for non existing dynamic libraries and failing
It is now possible to build against a shared embree library.
Before it was only possible to build against static Embree libraries.
Reviewed By: Brecht
Differential Revision: http://developer.blender.org/D8702
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/Modules/FindEmbree.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake index ccd0d6cd40a..2b3cd8e20c4 100644 --- a/build_files/cmake/Modules/FindEmbree.cmake +++ b/build_files/cmake/Modules/FindEmbree.cmake @@ -59,6 +59,14 @@ FOREACH(COMPONENT ${_embree_FIND_COMPONENTS}) PATH_SUFFIXES lib64 lib ) + IF (NOT EMBREE_${UPPERCOMPONENT}_LIBRARY) + IF (EMBREE_EMBREE3_LIBRARY) + # If we can't find all the static libraries, try to fall back to the shared library if found. + # This allows building with a shared embree library + SET(_embree_LIBRARIES ${EMBREE_EMBREE3_LIBRARY}) + BREAK() + ENDIF () + ENDIF () LIST(APPEND _embree_LIBRARIES "${EMBREE_${UPPERCOMPONENT}_LIBRARY}") ENDFOREACH() |