summaryrefslogtreecommitdiff
path: root/src/codec
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/meson.build9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/codec/meson.build b/src/codec/meson.build
index 20524a4..4ca9c53 100644
--- a/src/codec/meson.build
+++ b/src/codec/meson.build
@@ -13,8 +13,8 @@ av_client_src = [
'libav/decoder.c',
'libav/resampler.c'
]
-av_ldflags = []
av_inc = []
+av_args = []
av_server_deps = []
av_client_deps = []
av_client_use_scaler = false
@@ -36,7 +36,6 @@ if not (libavutil.found() and libavformat.found() and libavcodec.found() and lib
libavcodec = av_proj.get_variable('avcodec')
libswresample = av_proj.get_variable('swresample')
libswscale = av_proj.get_variable('swscale')
- av_ldflags += ['-L' + av_proj.get_variable('av_lib_dir')]
# Only used to set include dirs for libav.
av_inc_dep = av_proj.get_variable('av_inc_dep')
av_server_deps += [av_inc_dep]
@@ -50,16 +49,16 @@ if not (libavutil.found() and libavformat.found() and libavcodec.found() and lib
endif
if libavutil.found() and libavformat.found() and libavcodec.found() and libswresample.found() and libswscale.found()
+ av_args += ['-DHAVE_FFMPEG']
av_server_deps += [libavutil, libavformat, libavcodec]
av_client_deps += [libavutil, libavformat, libavcodec, libswresample]
if av_client_use_scaler
av_client_deps += [libswscale]
endif
av_server = declare_dependency(sources: av_server_src, dependencies: av_server_deps,
- include_directories: av_inc, link_args: av_ldflags)
+ include_directories: av_inc, compile_args: av_args)
av_client = declare_dependency(sources: av_client_src, dependencies: av_client_deps,
- include_directories: av_inc, link_args: av_ldflags)
- add_project_arguments('-DHAVE_FFMPEG', language: ['c', 'cpp'])
+ include_directories: av_inc, compile_args: av_args)
endif
stb_image = declare_dependency(sources: ['stb_image/impl.c'],