summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2021-02-16 15:02:41 -0600
committerBe <be@mixxx.org>2021-02-16 23:50:37 -0600
commit18bc1e8042a63ccbbef102b9639ec4cc81152fac (patch)
tree68935004b42bac90189d59bf97b887a62bcc1175
parente5d98a53b84f1b413462fc704bf87fde7784a1b2 (diff)
CMake: disable FFMPEG automatically if it is too old
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--CMakeLists.txt2
2 files changed, 1 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0e98d8aa5b..1d7da460a7 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,10 +11,8 @@ jobs:
include:
- name: Ubuntu 18.04 (gcc)
os: ubuntu-18.04
- # FFMPEG version on 18.04 is too old
cmake_args: >-
-DFAAD=ON
- -DFFMPEG=OFF
-DLOCALECOMPARE=ON
-DMAD=ON
-DMODPLUG=ON
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84edfaf36b..3b606c19d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2240,7 +2240,7 @@ endif()
# FFmpeg 4.x support
# FFmpeg is multimedia library that can be found http://ffmpeg.org/
find_package(FFMPEG COMPONENTS libavcodec libavformat libavutil libswresample)
-cmake_dependent_option(FFMPEG "FFmpeg 4.x support" ON "FFMPEG_FOUND" OFF)
+cmake_dependent_option(FFMPEG "FFmpeg 4.x support" ON "FFMPEG_FOUND;FFMPEG_libavcodec_VERSION VERSION_GREATER_EQUAL 58" OFF)
if(FFMPEG)
if(NOT FFMPEG_libavcodec_FOUND)
message(FATAL_ERROR "FFmpeg support requires libavcodec and its development headers.")