summaryrefslogtreecommitdiff
path: root/src/codec/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/meson.build')
-rw-r--r--src/codec/meson.build20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/codec/meson.build b/src/codec/meson.build
index 81144d4..a92a23d 100644
--- a/src/codec/meson.build
+++ b/src/codec/meson.build
@@ -3,29 +3,37 @@ codec_src = ['packet_ext.c', 'codecs.c']
codec_server_deps = []
codec_client_deps = []
-if get_option('codecs').contains('ffmpeg')
+if 'ffmpeg' in get_option('codecs')
subdir('ffmpeg')
endif
-if get_option('codecs').contains('stb_image')
- stb = subproject('stb').get_variable('stb')
+if 'stb_image' in get_option('codecs')
+ stb = []
stb_args = ['-DCAMU_HAVE_STB_IMAGE']
+ if not compiler.check_header('stb/stb_image.h')
+ stb = [subproject('stb').get_variable('stb')]
+ stb_args += ['-DCAMU_LOCAL_STB']
+ endif
stb_codec = declare_dependency(sources: ['stb_image.c'],
dependencies: stb, compile_args: stb_args)
codec_server_deps += [stb_codec]
codec_client_deps += [stb_codec]
endif
-if get_option('codecs').contains('wuffs')
- wuffs = subproject('wuffs').get_variable('wuffs')
+if 'wuffs' in get_option('codecs')
+ wuffs = []
wuffs_args = ['-DCAMU_HAVE_WUFFS']
+ if not compiler.check_header('wuffs/wuffs-v0.4.c')
+ wuffs = [subproject('wuffs').get_variable('wuffs')]
+ wuffs_args += ['-DCAMU_LOCAL_WUFFS']
+ endif
wuffs_codec = declare_dependency(sources: ['wuffs.c'],
dependencies: wuffs, compile_args: wuffs_args)
codec_server_deps += [wuffs_codec]
codec_client_deps += [wuffs_codec]
endif
-if get_option('codecs').contains('spng')
+if 'spng' in get_option('codecs')
spng = dependency('spng')
spng_args = ['-DCAMU_HAVE_SPNG']
spng_codec = declare_dependency(sources: ['spng.c'],