[Bf-blender-cvs] [de0b480] master: install_deps: add check for glew version, too old ones are not compatible with OSD.

Ejner Fergo noreply at git.blender.org
Fri Apr 29 16:57:10 CEST 2016


Commit: de0b48062923a1cb0330f4e6e2b2d64002e117c5
Author: Ejner Fergo
Date:   Fri Apr 29 16:42:11 2016 +0200
Branches: master
https://developer.blender.org/rBde0b48062923a1cb0330f4e6e2b2d64002e117c5

install_deps: add check for glew version, too old ones are not compatible with OSD.

In case too old system glew is detected, use the one shipped with blender.

Part of D1933.

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

M	build_files/build_environment/install_deps.sh

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

diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index 5d5ef1b..48f4d20 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -372,6 +372,9 @@ MP3LAME_DEV=""
 OPENJPEG_USE=false
 OPENJPEG_DEV=""
 
+# Whether to use system GLEW or not (OpenSubDiv needs recent glew to work).
+NO_SYSTEM_GLEW=false
+
 # Switch to english language, else some things (like check_package_DEB()) won't work!
 LANG_BACK=$LANG
 LANG=""
@@ -2451,6 +2454,27 @@ install_DEB() {
     fi
   fi
 
+  PRINT ""
+  _glew=`get_package_version_DEB libglew-dev`
+  if [ -z $_glew ]; then
+    # Stupid virtual package in Ubuntu 12.04 doesn't show version number...
+    _glew=`apt-cache showpkg libglew-dev|tail -n1|awk '{print $2}'|sed 's/-.*//'`
+  fi
+  version_ge $_glew "1.9.0"
+  if [ $? -eq 1 ]; then
+    version_ge $_glew "1.7.0"
+    if [ $? -eq 1 ]; then
+      WARNING "OpenSubdiv disabled because GLEW-$_glew is not enough"
+      WARNING "Blender will not use system GLEW library"
+      OSD_SKIP=true
+      NO_SYSTEM_GLEW=true
+    else
+      WARNING "OpenSubdiv will compile with GLEW-$_glew but with limited capability"
+      WARNING "Blender will not use system GLEW library"
+      NO_SYSTEM_GLEW=true
+    fi
+  fi
+
 
   PRINT ""
   _do_compile_python=false
@@ -3953,6 +3977,12 @@ print_info() {
     _buildargs="$_buildargs $_1"
   fi
 
+  if [ "$NO_SYSTEM_GLEW" = true ]; then
+    _1="-D WITH_SYSTEM_GLEW=OFF"
+    PRINT "  $_1"
+    _buildargs="$_buildargs $_1"
+  fi
+
   if [ "$FFMPEG_SKIP" = false ]; then
     _1="-D WITH_CODEC_FFMPEG=ON"
     _2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;`print_info_ffmpeglink`'"




More information about the Bf-blender-cvs mailing list