diff options
Diffstat (limited to 'libgweather/tools/meson.build')
-rw-r--r-- | libgweather/tools/meson.build | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libgweather/tools/meson.build b/libgweather/tools/meson.build new file mode 100644 index 0000000..c1f63c6 --- /dev/null +++ b/libgweather/tools/meson.build @@ -0,0 +1,40 @@ +tools = [ + { + 'name': 'locations', + }, + { + 'name': 'locations_utc', + }, + { + 'name': 'metar', + }, + { + 'name': 'sun_moon', + 'sources': [ + 'test_sun_moon.c', + '../weather-sun.c', + '../weather-moon.c', + ], + }, + { + 'name': 'weather', + } +] + +tools_cargs = [ + '-DTEST_LOCATIONS="@0@"'.format(locations_bin.full_path()), + '-DSCHEMASDIR="@0@/schemas"'.format(meson.source_root()), + '-DSCHEMAS_BUILDDIR="@0@/schemas"'.format(meson.build_root()), +] + +foreach tool: tools + tool_name = tool.get('name') + tool_sources = tool.get('sources', ['test_' + tool_name + '.c']) + + executable('test_' + tool_name, + sources: tool_sources, + c_args: tools_cargs, + dependencies: libgweather_static_dep, + install: false, + ) +endforeach |