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 /CMakeLists.txt
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 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt33
1 files changed, 31 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b328669e48..b8f7605875f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -361,6 +361,19 @@ if(UNIX AND NOT APPLE)
set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
endif()
+ # set lib directory if it exists
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/linux64)
+ else()
+ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/linux)
+ endif()
+
+ if(NOT EXISTS ${LIBDIR})
+ unset(LIBDIR)
+ endif()
+ endif()
+
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
@@ -435,10 +448,17 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_CODEC_FFMPEG)
- set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
+ # use lib dir if available and nothing else specified
+ if(LIBDIR AND NOT FFMPEG)
+ set(FFMPEG ${LIBDIR}/ffmpeg CACHE PATH "FFMPEG Directory")
+ set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale dirac_encoder mp3lame ogg orc-0.4 schroedinger-1.0 theora theoraenc theoradec vorbis vorbisenc vpx x264 xvidcore faad asound CACHE STRING "FFMPEG Libraries")
+ else()
+ set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
+ set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
+ endif()
+
mark_as_advanced(FFMPEG)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
- set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
mark_as_advanced(FFMPEG_LIBRARIES)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
@@ -504,6 +524,10 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_BOOST)
+ # use lib dir if available and nothing else specified
+ if(LIBDIR AND NOT BOOST_ROOT)
+ set(BOOST_ROOT ${LIBDIR}/boost)
+ endif()
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)
@@ -519,6 +543,11 @@ if(UNIX AND NOT APPLE)
endif()
if(WITH_OPENIMAGEIO)
+ # use lib dir if available and nothing else specified
+ if(LIBDIR AND NOT OPENIMAGEIO_ROOT_DIR)
+ set(OPENIMAGEIO_ROOT_DIR ${LIBDIR}/openimageio)
+ endif()
+
find_package(OpenImageIO)
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})