summaryrefslogtreecommitdiff
path: root/libre/blender/embree.patch
blob: bed0b39e744c66fac1efdbceb683fde03a282bba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index d9a2ebf8571..f3b7d156024 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -66,6 +66,12 @@ if(WITH_CYCLES_LOGGING)
   )
 endif()
 
+if(WITH_CYCLES_EMBREE)
+  list(APPEND LIB
+    ${EMBREE_LIBRARIES}
+  )
+endif()
+
 set(ADDON_FILES
   addon/__init__.py
   addon/engine.py
diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake
index d9d525d4586..03b509a28f3 100644
--- a/build_files/cmake/Modules/FindEmbree.cmake
+++ b/build_files/cmake/Modules/FindEmbree.cmake
@@ -72,7 +72,7 @@ ENDFOREACH()
 
 FIND_LIBRARY(EMBREE_LIBRARY
   NAMES
-    libembree3
+    embree3
   HINTS
     ${_embree_SEARCH_DIRS}
   PATH_SUFFIXES
@@ -83,10 +83,10 @@ FIND_LIBRARY(EMBREE_LIBRARY
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG
-    _embree_LIBRARIES EMBREE_INCLUDE_DIR)
+    EMBREE_LIBRARY EMBREE_INCLUDE_DIR)
 
 IF(EMBREE_FOUND)
-  SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
+  SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
   SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
 ENDIF(EMBREE_FOUND)