From fb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sat, 27 Jan 2024 20:32:54 -0500 Subject: Improve build and add dependencies Signed-off-by: Andrew Opalach --- src/codec/meson.build | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/codec') 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'], -- cgit v1.2.3-101-g0448