diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-03-14 23:32:52 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-03-14 23:33:06 +0100 |
commit | eee2e1eaad95c06ab052600fde772f57d74df223 (patch) | |
tree | d50f14188d2b8a9ad44cc605706cabbc5845fdd4 /CMakeLists.txt | |
parent | 0b39e139af35ded8eedb763c47cc9a4b3d8fae14 (diff) |
Allow to enable FFmpeg even if no component versions available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea01dfab3f..3047c3d895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2301,7 +2301,12 @@ 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;FFMPEG_libavcodec_VERSION VERSION_GREATER_EQUAL 58" OFF) +# On Windows version numbers are not available! +if(FFMPEG_libavcodec_VERSION) + cmake_dependent_option(FFMPEG "FFmpeg 4.x support" ON "FFMPEG_FOUND;FFMPEG_libavcodec_VERSION VERSION_GREATER_EQUAL 58" OFF) +else() + cmake_dependent_option(FFMPEG "FFmpeg 4.x support" ON "FFMPEG_FOUND" OFF) +endif() if(FFMPEG) if(NOT FFMPEG_libavcodec_FOUND) message(FATAL_ERROR "FFmpeg support requires libavcodec and its development headers.") |