summaryrefslogtreecommitdiff
path: root/src/codec
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-01-27 20:32:54 -0500
committerAndrew Opalach <andrew@akon.city> 2024-01-27 20:32:54 -0500
commitfb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3 (patch)
tree2648f4e00ba85d2f2e7a5fb3321d55cd0f5a76b6 /src/codec
parentdd2036e23a1f800f13b821eaa862403de1aa17f0 (diff)
downloadcamu-fb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3.tar.gz
camu-fb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3.tar.bz2
camu-fb1cbf546300d9f8efdf21c6ac66f7c2f1dfd4f3.zip
Improve build and add dependencies
Signed-off-by: Andrew Opalach <andrew@akon.city>
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'],