diff options
author | Wolfgang Schupp <w.schupp@a1.net> | 2018-06-15 13:51:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-15 13:51:02 +0200 |
commit | d7a7d9913e3bae583f8c3349e8aff8bd833ee61a (patch) | |
tree | 9a6d5378f1015ed390c6aa561e1278ff0600c3c5 /tools | |
parent | c14e34d50cd8cf5025e5f6530a5d0bcac79120db (diff) | |
parent | 91e0de19bc55d3306a247116b926dabd0327f413 (diff) |
Merge pull request #14017 from wsnipex/ffmpeg-opts
[cmake] pass vaapi and vdpau options to internal ffmpeg
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/ffmpeg/CMakeLists.txt | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index 9df273de09..4494a26128 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -4,18 +4,7 @@ cmake_minimum_required(VERSION 2.8) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -# ENABLE_CCACHE can have the following values ON|OFF|AUTO -# During initial kodi project generation the forwarded ENABLE_CCACHE is empty, if ENABLE_CCACHE wasn't explicitly set. -# This happens as FindFFmpeg is called before core_optional_dep(CCache) which sets ENABLE_CCACHE to AUTO in that case. -# Therefore treat empty ENABLE_CCACHE like ON and AUTO. -if(ENABLE_CCACHE STREQUAL "" OR ENABLE_CCACHE) - find_program(CCACHE_PROGRAM ccache) - if(CCACHE_PROGRAM) - set(USE_CCACHE ON) - endif() -endif() - -if(USE_CCACHE) +if(ENABLE_CCACHE AND CCACHE_PROGRAM) set(ffmpeg_conf "--cc=${CCACHE_PROGRAM} ${CMAKE_C_COMPILER}" "--cxx=${CCACHE_PROGRAM} ${CMAKE_CXX_COMPILER}") else() set(ffmpeg_conf --cc=${CMAKE_C_COMPILER} --cxx=${CMAKE_CXX_COMPILER}) @@ -53,7 +42,17 @@ if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) if(CORE_PLATFORM_NAME STREQUAL rbpi) list(APPEND ffmpeg_conf --cpu=${CPU} --disable-vaapi --disable-vdpau) else() - list(APPEND ffmpeg_conf --enable-vdpau --enable-vaapi --enable-pic) + list(APPEND ffmpeg_conf --enable-pic) + if(ENABLE_VAAPI) + list(APPEND ffmpeg_conf --enable-vaapi) + else() + list(APPEND ffmpeg_conf --disable-vaapi) + endif() + if(ENABLE_VDPAU) + list(APPEND ffmpeg_conf --enable-vdpau) + else() + list(APPEND ffmpeg_conf --disable-vdpau) + endif() endif() elseif(CORE_SYSTEM_NAME STREQUAL android) if(CPU MATCHES arm64) |