diff options
Diffstat (limited to 'graphics/Blender/01_FindEmbree_so.diff')
-rw-r--r-- | graphics/Blender/01_FindEmbree_so.diff | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/graphics/Blender/01_FindEmbree_so.diff b/graphics/Blender/01_FindEmbree_so.diff new file mode 100644 index 000000000000..6739f6852a82 --- /dev/null +++ b/graphics/Blender/01_FindEmbree_so.diff @@ -0,0 +1,75 @@ +--- build_files/cmake/Modules/FindEmbree.cmake.orig 2020-10-21 18:59:19.000000000 +1000 ++++ build_files/cmake/Modules/FindEmbree.cmake 2021-01-16 01:26:51.000000000 +1000 +@@ -7,19 +7,12 @@ + # EMBREE_ROOT_DIR, The base directory to search for Embree. + # This can also be an environment variable. + # EMBREEFOUND, If false, do not try to use Embree. +-# +-# also defined, but not for general use are +-# EMBREE_LIBRARY, where to find the Embree library. + + #============================================================================= + # Copyright 2018 Blender Foundation. + # +-# Distributed under the OSI-approved BSD License (the "License"); +-# see accompanying file Copyright.txt for details. +-# +-# This software is distributed WITHOUT ANY WARRANTY; without even the +-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-# See the License for more information. ++# Distributed under the OSI-approved BSD 3-Clause License, ++# see accompanying file BSD-3-Clause-license.txt for details. + #============================================================================= + + # If EMBREE_ROOT_DIR was defined in the environment, use it. +@@ -44,9 +37,9 @@ + + SET(_embree_FIND_COMPONENTS + embree3 ++ embree_sse42 + embree_avx + embree_avx2 +- embree_sse42 + lexers + math + simd +@@ -66,29 +59,28 @@ + 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() + + +-FIND_LIBRARY(EMBREE_LIBRARY +- NAMES +- libembree3 +- HINTS +- ${_embree_SEARCH_DIRS} +- PATH_SUFFIXES +- lib64 lib +-) +- + # handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if + # all listed variables are TRUE + INCLUDE(FindPackageHandleStandardArgs) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(Embree DEFAULT_MSG + _embree_LIBRARIES EMBREE_INCLUDE_DIR) + + IF(EMBREE_FOUND) + SET(EMBREE_LIBRARIES ${_embree_LIBRARIES}) + SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR}) +-ENDIF(EMBREE_FOUND) ++ENDIF() + + MARK_AS_ADVANCED( + EMBREE_INCLUDE_DIR |