summaryrefslogtreecommitdiff
path: root/libgweather/tools/meson.build
blob: b50e194b21265c21ad5591ea0d56c6b56d6b0182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
tools = [
  {
    '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