diff options
author | Ejner Fergo <ejnersan@gmail.com> | 2016-04-29 17:42:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-04-29 17:43:28 +0300 |
commit | de0b48062923a1cb0330f4e6e2b2d64002e117c5 (patch) | |
tree | ae501aacfb9b9cee7695598588931b8cc267e4a4 /build_files | |
parent | 3ccc61c03a8f706a13afd7ba5f7823f468659680 (diff) |
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.
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/build_environment/install_deps.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 5d5ef1b613d..48f4d208d8f 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`'" |