diff options
| author | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
| commit | 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch) | |
| tree | cc9e1f8ea69eebca8416677b2470a5b3f11a850e /cmake/modules/FindFFMPEG.cmake | |
| parent | b3d195f0188758a14875a5a2f270e4fd190a679f (diff) | |
| download | kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.gz kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.bz2 kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.zip | |
sync with upstream
Diffstat (limited to 'cmake/modules/FindFFMPEG.cmake')
| -rw-r--r-- | cmake/modules/FindFFMPEG.cmake | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake index e2fbe8d..ef74671 100644 --- a/cmake/modules/FindFFMPEG.cmake +++ b/cmake/modules/FindFFMPEG.cmake | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | # usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix | 18 | # usage: -DWITH_FFMPEG=/path/to/ffmpeg_install_prefix |
| 19 | # | 19 | # |
| 20 | # -------- | 20 | # -------- |
| 21 | # This module will will define the following variables: | 21 | # This module will define the following variables: |
| 22 | # | 22 | # |
| 23 | # FFMPEG_FOUND - system has FFmpeg | 23 | # FFMPEG_FOUND - system has FFmpeg |
| 24 | # FFMPEG_INCLUDE_DIRS - FFmpeg include directory | 24 | # FFMPEG_INCLUDE_DIRS - FFmpeg include directory |
| @@ -33,14 +33,14 @@ | |||
| 33 | # | 33 | # |
| 34 | 34 | ||
| 35 | # required ffmpeg library versions | 35 | # required ffmpeg library versions |
| 36 | set(REQUIRED_FFMPEG_VERSION 3.4) | 36 | set(REQUIRED_FFMPEG_VERSION 4.0) |
| 37 | set(_avcodec_ver ">=57.107.100") | 37 | set(_avcodec_ver ">=58.18.100") |
| 38 | set(_avfilter_ver ">=6.107.100") | 38 | set(_avfilter_ver ">=7.16.100") |
| 39 | set(_avformat_ver ">=57.83.100") | 39 | set(_avformat_ver ">=58.12.100") |
| 40 | set(_avutil_ver ">=55.78.100") | 40 | set(_avutil_ver ">=56.14.100") |
| 41 | set(_swscale_ver ">=4.8.100") | 41 | set(_swscale_ver ">=5.1.100") |
| 42 | set(_swresample_ver ">=2.9.100") | 42 | set(_swresample_ver ">=3.1.100") |
| 43 | set(_postproc_ver ">=54.7.100") | 43 | set(_postproc_ver ">=55.1.100") |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | # Allows building with external ffmpeg not found in system paths, | 46 | # Allows building with external ffmpeg not found in system paths, |
| @@ -229,6 +229,11 @@ if(NOT FFMPEG_FOUND) | |||
| 229 | message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") | 229 | message(STATUS "FFMPEG_URL: ${FFMPEG_URL}") |
| 230 | endif() | 230 | endif() |
| 231 | 231 | ||
| 232 | set(FFMPEG_OPTIONS -DENABLE_CCACHE=${ENABLE_CCACHE} | ||
| 233 | -DCCACHE_PROGRAM=${CCACHE_PROGRAM} | ||
| 234 | -DENABLE_VAAPI=${ENABLE_VAAPI} | ||
| 235 | -DENABLE_VDPAU=${ENABLE_VDPAU}) | ||
| 236 | |||
| 232 | if(KODI_DEPENDSBUILD) | 237 | if(KODI_DEPENDSBUILD) |
| 233 | set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} | 238 | set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH} |
| 234 | -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE} | 239 | -DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE} |
| @@ -237,6 +242,8 @@ if(NOT FFMPEG_FOUND) | |||
| 237 | -DOS=${OS} | 242 | -DOS=${OS} |
| 238 | -DCMAKE_AR=${CMAKE_AR}) | 243 | -DCMAKE_AR=${CMAKE_AR}) |
| 239 | endif() | 244 | endif() |
| 245 | set(LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) | ||
| 246 | list(APPEND LINKER_FLAGS ${SYSTEM_LDFLAGS}) | ||
| 240 | 247 | ||
| 241 | externalproject_add(ffmpeg | 248 | externalproject_add(ffmpeg |
| 242 | URL ${FFMPEG_URL} | 249 | URL ${FFMPEG_URL} |
| @@ -255,8 +262,9 @@ if(NOT FFMPEG_FOUND) | |||
| 255 | -DENABLE_CCACHE=${ENABLE_CCACHE} | 262 | -DENABLE_CCACHE=${ENABLE_CCACHE} |
| 256 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | 263 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} |
| 257 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | 264 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} |
| 258 | -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS} | 265 | -DCMAKE_EXE_LINKER_FLAGS=${LINKER_FLAGS} |
| 259 | ${CROSS_ARGS} | 266 | ${CROSS_ARGS} |
| 267 | ${FFMPEG_OPTIONS} | ||
| 260 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy | 268 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy |
| 261 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt | 269 | ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt |
| 262 | <SOURCE_DIR> && | 270 | <SOURCE_DIR> && |
