lib/ffmpeg/meson.build: move libavutil helpers into separate library

This commit is contained in:
Max Kellermann 2023-05-22 13:49:38 +02:00
parent 6d9b452fde
commit 7c759ba8b0
1 changed files with 25 additions and 2 deletions

View File

@ -13,6 +13,29 @@ else
endif
conf.set('HAVE_LIBAVFILTER', libavfilter_dep.found())
if not libavutil_dep.found()
ffmpeg_util_dep = dependency('', required: false)
ffmpeg_dep = dependency('', required: false)
subdir_done()
endif
ffmpeg_util = static_library(
'ffmpeg_util',
'Interleave.cxx',
'Error.cxx',
include_directories: inc,
dependencies: [
libavutil_dep,
],
)
ffmpeg_util_dep = declare_dependency(
link_with: ffmpeg_util,
dependencies: [
libavutil_dep,
],
)
if not enable_ffmpeg
ffmpeg_dep = dependency('', required: false)
subdir_done()
@ -36,10 +59,10 @@ ffmpeg = static_library(
ffmpeg_sources,
include_directories: inc,
dependencies: [
ffmpeg_util_dep,
libavformat_dep,
libavcodec_dep,
libavfilter_dep,
libavutil_dep,
log_dep,
],
)
@ -47,9 +70,9 @@ ffmpeg = static_library(
ffmpeg_dep = declare_dependency(
link_with: ffmpeg,
dependencies: [
ffmpeg_util_dep,
libavformat_dep,
libavcodec_dep,
libavfilter_dep,
libavutil_dep,
],
)