diff options
author | Nuno Sénica <nuno.senica@booking.com> | 2017-01-30 22:03:03 +0100 |
---|---|---|
committer | Nuno Sénica <nuno.senica@booking.com> | 2017-01-30 22:04:19 +0100 |
commit | c046d8bdf349198b8bd52e6f9a1b3e3b0c1635d4 (patch) | |
tree | eff45a2aa5df84262bf407c728dbc195762a1a54 /tools/depends/target/ffmpeg | |
parent | 549c11fb98a3ef40be1f0210ab26ca28d3d80a63 (diff) |
Tidy up ffmpeg in order to be more flexible and versatile. Also includes switches for Raspberry Pi
Diffstat (limited to 'tools/depends/target/ffmpeg')
-rw-r--r-- | tools/depends/target/ffmpeg/CMakeLists.txt | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index 57cb563c96..5bc3d791f9 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -11,10 +11,29 @@ if(CROSSCOMPILING) list(APPEND ffmpeg_conf --pkg-config=${PKG_CONFIG_EXECUTABLE} --pkg-config-flags=--static) list(APPEND ffmpeg_conf --enable-cross-compile --cpu=${CPU} --arch=${CPU} --target-os=${OS}) list(APPEND ffmpeg_conf --cc=${CMAKE_C_COMPILER} --cxx=${CMAKE_CXX_COMPILER} --ar=${CMAKE_AR}) - list(APPEND ffmpeg_conf --extra-cflags=${CMAKE_C_FLAGS} --extra-cxxflags=${CMAKE_CXX_FLAGS} --extra-ldflags=${CMAKE_EXE_LINKER_FLAGS}) message(STATUS "CROSS: ${ffmpeg_conf}") endif() +if(CMAKE_C_FLAGS) + list(APPEND ffmpeg_conf --extra-cflags=${CMAKE_C_FLAGS}) +endif() + +if(CMAKE_CXX_FLAGS) + list(APPEND ffmpeg_conf --extra-cxxflags=${CMAKE_CXX_FLAGS}) +endif() + +if(CMAKE_EXE_LINKER_FLAGS) + list(APPEND ffmpeg_conf --extra-ldflags=${CMAKE_EXE_LINKER_FLAGS}) +endif() + +if(ENABLE_NEON) + list(APPEND ffmpeg_conf --enable-neon) +endif() + +if(CMAKE_BUILD_TYPE STREQUAL Release) + list(APPEND ffmpeg_conf --disable-debug) +endif() + if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) list(APPEND ffmpeg_conf --enable-vdpau --enable-vaapi --enable-pic) elseif(CORE_SYSTEM_NAME STREQUAL android) @@ -37,6 +56,13 @@ elseif(CORE_SYSTEM_NAME STREQUAL osx) --disable-decoder=mpeg_xvmc --disable-vda --disable-crystalhd --enable-videotoolbox --target-os=darwin --disable-securetransport) +elseif(CORE_SYSTEM_NAME STREQUAL rbpi) + if(CPU STREQUAL "cortex-a7" OR CPU STREQUAL "cortex-a53") + list(APPEND ffmpeg_conf --cpu=${CPU} --enable-pic --disable-armv5te --disable-armv6t2) + endif() + list(APPEND ffmpeg_conf --enable-hardcoded-tables --disable-vaapi --disable-vdpau --enable-mmal + --enable-omx-rpi) + endif() if(CPU MATCHES arm) @@ -50,6 +76,8 @@ if(GNUTLS_FOUND) list(APPEND ffmpeg_conf --enable-gnutls) endif() +message(STATUS "FFMPEG_CONF: ${ffmpeg_conf}") + include(ExternalProject) externalproject_add(ffmpeg SOURCE_DIR ${CMAKE_SOURCE_DIR} |