[Bf-blender-cvs] [4cdff68309a] cycles_path_guiding: deps: fix openpgl assuming dynamic embree

Ray Molenkamp noreply at git.blender.org
Fri Jun 24 21:21:51 CEST 2022


Commit: 4cdff68309a76a46ad9846c41182f71565e81cf7
Author: Ray Molenkamp
Date:   Fri Jun 24 13:21:43 2022 -0600
Branches: cycles_path_guiding
https://developer.blender.org/rB4cdff68309a76a46ad9846c41182f71565e81cf7

deps: fix openpgl assuming dynamic embree

openpgl's build uses the embree config files which are
aware it is a static version of embree, but never
actually pass -DEMBREE_STATIC_LIB to openpgl's CXX flags,
resulting in the assumption that embree is dynamic,
which causes linker errors when we link it against
static embree in the final blender binary.

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

M	build_files/build_environment/cmake/openpgl.cmake

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

diff --git a/build_files/build_environment/cmake/openpgl.cmake b/build_files/build_environment/cmake/openpgl.cmake
index 13b9d807f31..cdc2651c4d1 100644
--- a/build_files/build_environment/cmake/openpgl.cmake
+++ b/build_files/build_environment/cmake/openpgl.cmake
@@ -10,6 +10,12 @@ set(OPENPGL_EXTRA_ARGS
     -DTBB_ROOT=${LIBDIR}/tbb
     -Dembree_DIR=${LIBDIR}/embree/lib/cmake/embree-${EMBREE_VERSION}
     -DCMAKE_DEBUG_POSTFIX=_d
+# openpgl's build uses the embree config files which are aware it is
+# a static version of embree, but never actually pass -DEMBREE_STATIC_LIB
+# to openpgl's CXX flags, resulting in the assumption that embree is dynamic,
+# which causes linker errors when we link it against static embree in the final
+# blender binary.
+    -DCMAKE_CXX_FLAGS=-DEMBREE_STATIC_LIB
 )
 
 if(TBB_STATIC_LIBRARY)



More information about the Bf-blender-cvs mailing list