LibMedia: Mark ffmpeg as required, and reorganize CMakeLists

Now it should be clearer looking at the build scripts what options
are available for building LibMedia, and what packages are required.
This commit is contained in:
Andrew Kaster 2024-10-02 12:40:19 -06:00 committed by Tim Flynn
commit ebaba7fb7b
Notes: github-actions[bot] 2024-10-02 20:04:30 +00:00
4 changed files with 20 additions and 34 deletions

View file

@ -1,11 +1,6 @@
include_guard()
find_package(PkgConfig REQUIRED)
pkg_check_modules(AVCODEC IMPORTED_TARGET libavcodec)
pkg_check_modules(AVFORMAT IMPORTED_TARGET libavformat)
pkg_check_modules(AVUTIL IMPORTED_TARGET libavutil)
if (AVCODEC_FOUND AND AVFORMAT_FOUND AND AVUTIL_FOUND)
set(HAS_FFMPEG ON CACHE BOOL "" FORCE)
add_compile_definitions(USE_FFMPEG=1)
endif()
pkg_check_modules(AVCODEC REQUIRED IMPORTED_TARGET libavcodec)
pkg_check_modules(AVFORMAT REQUIRED IMPORTED_TARGET libavformat)
pkg_check_modules(AVUTIL REQUIRED IMPORTED_TARGET libavutil)