summaryrefslogtreecommitdiff
path: root/meson.build
blob: 8e2d91c93b5866238462191911c5b6c33790609b (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
35
36
37
38
39
40
41
project('iot-contact')

tar = find_program('tar', required : true)

fs = import('fs')

css = fs.copyfile(meson.current_source_dir() / 'simple.css' / 'simple.css')

subdir('tools')
subdir('fw')
subdir('pcb')
subdir('web')

artifacts = [
  index_html,
  css,
  schematic,
  bom,
  simulation,
  update_image,
  factory_image,
  kicad_pcb,
]

custom_target(
  output: meson.project_name() + '.tar.zst',
  command: [
    tar,
    '--zstd',
    '--transform=s|^fw/app/||',
    '--transform=s|^fw/sim/||',
    '--transform=s|^fw/||',
    '--transform=s|^pcb/||',
    '--transform=s|^web/||',
    '--transform=s|^|' + meson.project_name() + '/|',
    '-cf', '@OUTPUT@',
    artifacts,
  ],
  depends: artifacts,
  build_by_default: true,
)