diff options
Diffstat (limited to 'tools/meson.build')
-rw-r--r-- | tools/meson.build | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/meson.build b/tools/meson.build index 032e272..59b1458 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -39,6 +39,18 @@ dav1d_output_sources = files( 'output/yuv.c', ) +# hacky check for xxhash.h to allow copying it to tools/output +if not get_option('xxhash_muxer').disabled() + xxhash_include = '-I' + meson.current_source_dir() / 'output' + if cc.has_header_symbol('xxhash.h', 'XXH3_createState', args : xxhash_include) + dav1d_output_sources += 'output/xxhash.c' + xxh3_found = true + elif get_option('xxhash_muxer').enabled() + # manual error since 'required' kw arg in has_header_symbol() was only added in meson 0.50 + error( 'C symbol XXH3_createState not found in header xxhash.h') + endif +endif + dav1d_input_objs = static_library('dav1d_input', dav1d_input_sources, @@ -69,6 +81,8 @@ endif # Configuratin data for cli_config.h cli_cdata = configuration_data() +cli_cdata.set10('HAVE_XXHASH_H', get_variable('xxh3_found', false)) + cli_config_h_target = configure_file(output: 'cli_config.h', configuration: cli_cdata) # dav1d cli tool sources |