summaryrefslogtreecommitdiff
path: root/examples/vala/simple-bar/meson.build
blob: d0ef2098a6fbb03c895f1beeb91ac8a91fc7626d (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
42
43
44
45
46
47
48
49
50
51
project('simple-bar', 'vala', 'c')

bindir = get_option('prefix') / get_option('bindir')
libdir = get_option('prefix') / get_option('libdir')

pkgconfig_deps = [
  dependency('glib-2.0'),
  dependency('gobject-2.0'),
  dependency('gtk+-3.0'),
  dependency('libnm'),
  dependency('astal-0.1'),
  dependency('astal-battery-0.1'),
  dependency('astal-wireplumber-0.1'),
  dependency('astal-network-0.1'),
  dependency('astal-tray-0.1'),
  dependency('astal-mpris-0.1'),
  dependency('astal-hyprland-0.1'),
]

# needed for GLib.Math
deps = pkgconfig_deps + meson.get_compiler('c').find_library('m')

custom_target(
  'style.css',
  command: [
    find_program('sass'),
    meson.project_source_root() / 'style.scss',
    '@OUTPUT@',
  ],
  output: 'style.css',
  install: true,
  install_dir: libdir,
)

main = configure_file(
  input: 'app.in.vala',
  output: 'app.vala',
  configuration: {'STYLE': libdir / 'style.css'},
)

sources = files(
  'widget/Bar.vala',
)

executable(
  'simple-bar',
  [sources, main],
  dependencies: deps,
  install: true,
  install_dir: bindir,
)