LibMedia: Link to avformat as well

This allows us to process container formats in future commits.
This commit is contained in:
Jelle Raaijmakers 2024-09-09 16:03:15 +02:00 committed by Andreas Kling
commit 1b267abf36
Notes: github-actions[bot] 2024-09-12 08:02:21 +00:00
4 changed files with 23 additions and 11 deletions

13
Meta/CMake/ffmpeg.cmake Normal file
View file

@ -0,0 +1,13 @@
include_guard()
find_package(PkgConfig REQUIRED)
pkg_check_modules(AVCODEC IMPORTED_TARGET libavcodec)
pkg_check_modules(AVFORMAT IMPORTED_TARGET libavformat)
if (AVCODEC_FOUND AND AVFORMAT_FOUND)
set(HAS_FFMPEG ON CACHE BOOL "" FORCE)
add_compile_definitions(USE_FFMPEG=1)
if (AVCODEC_VERSION VERSION_GREATER_EQUAL "59.24.100")
add_compile_definitions(USE_FFMPEG_CH_LAYOUT=1)
endif()
endif()