Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-11 18:52:24 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-11 18:52:24 +0400
commita7f09ea0b29fdbd24ce7a409533e20e3c4786d90 (patch)
tree80466e17abd027d49c6d7affb3e5921a83a077f6 /build_files
parente84c0980a3afb89301f8512acee64e525db3a49d (diff)
CMake/Scons: automatically use ffmpeg, boost and openimageio from the svn lib/
directory if available, which should make building with ffmpeg and cycles easier. If this folder is not available or another path is specified in user-config.py or CMakeCache.txt, this should have no effect. Wiki build instructions now show how to use these. http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux
Diffstat (limited to 'build_files')
-rw-r--r--build_files/scons/config/linux-config.py36
1 files changed, 30 insertions, 6 deletions
diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py
index 1ac1db62a28..4921ab50595 100644
--- a/build_files/scons/config/linux-config.py
+++ b/build_files/scons/config/linux-config.py
@@ -1,5 +1,12 @@
-LCGDIR = '../lib/linux'
-LIBDIR = "${LCGDIR}"
+# find library directory
+import platform
+import os
+bitness = platform.architecture()[0]
+if bitness == '64bit':
+ LCGDIR = '../lib/linux64'
+else:
+ LCGDIR = '../lib/linux'
+LIBDIR = "#${LCGDIR}"
BF_PYTHON_ABI_FLAGS = 'm' # Most common for linux distros
BF_PYTHON = '/usr'
@@ -113,7 +120,18 @@ WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
-BF_FFMPEG = '/usr'
+BF_FFMPEG = LIBDIR + '/ffmpeg'
+if os.path.exists(LCGDIR + '/ffmpeg'):
+ WITH_BF_STATICFFMPEG = True
+ BF_FFMPEG_LIB_STATIC = '${BF_FFMPEG_LIBPATH}/libavformat.a ${BF_FFMPEG_LIBPATH}/libswscale.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libavcodec.a ${BF_FFMPEG_LIBPATH}/libavdevice.a ${BF_FFMPEG_LIBPATH}/libavutil.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libxvidcore.a ${BF_FFMPEG_LIBPATH}/libx264.a ${BF_FFMPEG_LIBPATH}/libmp3lame.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libvpx.a ${BF_FFMPEG_LIBPATH}/libvorbis.a ${BF_FFMPEG_LIBPATH}/libogg.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libvorbisenc.a ${BF_FFMPEG_LIBPATH}/libtheora.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libschroedinger-1.0.a ${BF_FFMPEG_LIBPATH}/liborc-0.4.a ${BF_FFMPEG_LIBPATH}/libdirac_encoder.a ' + \
+ '${BF_FFMPEG_LIBPATH}/libfaad.a'
+else:
+ BF_FFMPEG = '/usr'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
@@ -178,20 +196,26 @@ BF_JEMALLOC_LIBPATH = '${BF_JEMALLOC}/lib'
BF_JEMALLOC_LIB = 'jemalloc'
BF_JEMALLOC_LIB_STATIC = '${BF_JEMALLOC_LIBPATH}/libjemalloc.a'
-WITH_BF_CYCLES = False
-
-WITH_BF_OIIO = True
+WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
+if not os.path.exists(LCGDIR + '/openimageio'):
+ WITH_BF_OIIO = False
+ BF_OIIO = '/usr'
BF_OIIO_INC = BF_OIIO + '/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = BF_OIIO + '/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
+if not os.path.exists(LCGDIR + '/boost'):
+ WITH_BF_BOOST = False
+ BF_BOOST = '/usr'
BF_BOOST_INC = BF_BOOST + '/include'
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt'
BF_BOOST_LIBPATH = BF_BOOST + '/lib'
+WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
+
WITH_BF_OPENMP = True
#Ray trace optimization