diff options
Diffstat (limited to 'src/codec/meson.build')
| -rw-r--r-- | src/codec/meson.build | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/codec/meson.build b/src/codec/meson.build index a92a23d..7dfc668 100644 --- a/src/codec/meson.build +++ b/src/codec/meson.build @@ -10,12 +10,23 @@ endif 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'] + stb_deps = [] + if get_option('codec-stbi-use-wuffs') + stb_args += ['-DCAMU_STBI_USE_WUFFS'] + if not compiler.check_header('wuffs/wuffs-v0.4.c') + wuffs = [subproject('wuffs').get_variable('wuffs')] + stb_deps += [wuffs] + stb_args += ['-DCAMU_LOCAL_WUFFS'] + endif + else + if not compiler.check_header('stb/stb_image.h') + stb = [subproject('stb').get_variable('stb')] + stb_deps += [stb] + stb_args += ['-DCAMU_LOCAL_STB'] + endif endif stb_codec = declare_dependency(sources: ['stb_image.c'], - dependencies: stb, compile_args: stb_args) + dependencies: stb_deps, compile_args: stb_args) codec_server_deps += [stb_codec] codec_client_deps += [stb_codec] endif |