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@gmail.com>2018-08-27 14:36:42 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-27 15:15:03 +0300
commit04075ed744e948bca09c8afac684415629edd1ba (patch)
treeb5c464b6dd224fb33336f73cfe088d8df782549a /build_files/build_environment/cmake/ffmpeg.cmake
parent31c99c0c4e4d3edf3d18a44c1da01d6ac15994bd (diff)
Build Environment: fix alembic, openvdb, ffmpeg, osl build on Linux.
Diffstat (limited to 'build_files/build_environment/cmake/ffmpeg.cmake')
-rw-r--r--build_files/build_environment/cmake/ffmpeg.cmake12
1 files changed, 5 insertions, 7 deletions
diff --git a/build_files/build_environment/cmake/ffmpeg.cmake b/build_files/build_environment/cmake/ffmpeg.cmake
index b0c76175508..5c8347cd40e 100644
--- a/build_files/build_environment/cmake/ffmpeg.cmake
+++ b/build_files/build_environment/cmake/ffmpeg.cmake
@@ -18,13 +18,6 @@
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
-if(UNIX AND NOT APPLE)
- # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
- # want for maximum runtime performance, but due to static nature of that library we
- # need to force FFpeg to link against pthread, otherwise test program used by autoconf
- # will fail.
- set(FFMPEG_LDFLAGS "${FFMPEG_LDFLAGS} -lpthread")
-endif()
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
@@ -64,6 +57,11 @@ ExternalProject_Add(external_ffmpeg
URL ${FFMPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFMPEG_HASH}
+ # OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
+ # want for maximum runtime performance, but due to static nature of that library we
+ # need to force ffmpeg to link against pthread, otherwise test program used by autoconf
+ # will fail. This patch does that in a way that is compatible with multiple distributions.
+ PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&