[Bf-blender-cvs] [f391e8f316b] master: Linux: Move Mesa software OpenGL libraries to sub-directory

Sergey Sharybin noreply at git.blender.org
Fri Jul 8 15:44:11 CEST 2022


Commit: f391e8f316bd29b700cef874a59cf3b64203d70c
Author: Sergey Sharybin
Date:   Fri Jul 8 15:15:02 2022 +0200
Branches: master
https://developer.blender.org/rBf391e8f316bd29b700cef874a59cf3b64203d70c

Linux: Move Mesa software OpenGL libraries to sub-directory

Allows to put libraries which are always needed by Blender into the
lib/ folder and not worry about OpenGL libraries picked up from there.

Currently no functional changes as we do not yet have dynamic libraries
which we load at startup. It allows to use direct linking of oneAPI
Cycles device (see D15397), also it is something which would need to
happen to support USD/Hydra/TBB compiler as dynamic libraries in the
future.

Differential Revision: https://developer.blender.org/D15403

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

M	release/bin/blender-softwaregl
M	source/creator/CMakeLists.txt

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

diff --git a/release/bin/blender-softwaregl b/release/bin/blender-softwaregl
index 8628dca2202..acd4dc3eec5 100755
--- a/release/bin/blender-softwaregl
+++ b/release/bin/blender-softwaregl
@@ -2,16 +2,16 @@
 BF_DIST_BIN=$(dirname "$0")
 BF_PROGRAM="blender" # BF_PROGRAM=$(basename "$0")-bin
 
-LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}
+LD_LIBRARY_PATH=${BF_DIST_BIN}/lib/mesa:${LD_LIBRARY_PATH}
 
 if [ -n "$LD_LIBRARYN32_PATH" ]; then
-    LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN32_PATH}
+    LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib/mesa:${LD_LIBRARYN32_PATH}
 fi
 if [ -n "$LD_LIBRARYN64_PATH" ]; then
-    LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN64_PATH}
+    LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib/mesa:${LD_LIBRARYN64_PATH}
 fi
 if [ -n "$LD_LIBRARY_PATH_64" ]; then
-    LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH_64}
+    LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib/mesa:${LD_LIBRARY_PATH_64}
 fi
 
 # Workaround for half-transparent windows when compiz is enabled
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 7457358698d..278cd4362c3 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -511,7 +511,7 @@ if(UNIX AND NOT APPLE)
     endif()
 
     if(EXISTS ${LIBDIR}/mesa)
-      install(DIRECTORY ${LIBDIR}/mesa/lib DESTINATION ".")
+      install(DIRECTORY ${LIBDIR}/mesa/lib/ DESTINATION "lib/mesa/")
 
       install(
         PROGRAMS



More information about the Bf-blender-cvs mailing list