summaryrefslogtreecommitdiff
path: root/examples/gtk4/simple-bar/vala/src/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gtk4/simple-bar/vala/src/meson.build')
-rw-r--r--examples/gtk4/simple-bar/vala/src/meson.build67
1 files changed, 67 insertions, 0 deletions
diff --git a/examples/gtk4/simple-bar/vala/src/meson.build b/examples/gtk4/simple-bar/vala/src/meson.build
new file mode 100644
index 0000000..a11da46
--- /dev/null
+++ b/examples/gtk4/simple-bar/vala/src/meson.build
@@ -0,0 +1,67 @@
+pkgdatadir = get_option('prefix') / get_option('datadir')
+bindir = get_option('prefix') / get_option('bindir')
+blp = find_program('blueprint-compiler', required: true)
+sass = find_program('sass', required: true)
+
+dependencies = [
+ dependency('gtk4-layer-shell-0'),
+ dependency('astal-io-0.1'),
+ dependency('glib-2.0'),
+ dependency('astal-4-4.0'),
+ dependency('astal-battery-0.1'),
+ dependency('astal-wireplumber-0.1'),
+ dependency('astal-network-0.1'),
+ dependency('libnm'),
+ dependency('astal-mpris-0.1'),
+ dependency('astal-power-profiles-0.1'),
+ dependency('astal-tray-0.1'),
+ dependency('astal-bluetooth-0.1'),
+]
+
+blueprint_sources = files(
+ 'ui/Bar.blp',
+)
+
+vala_sources = files(
+ 'vala/Bar.vala',
+ 'vala/App.vala',
+)
+
+# transplie blueprints
+ui = custom_target(
+ 'blueprint',
+ input: blueprint_sources,
+ output: '.',
+ command: [
+ blp,
+ 'batch-compile',
+ '@OUTPUT@',
+ '@CURRENT_SOURCE_DIR@',
+ '@INPUT@',
+ ],
+)
+
+# bundle scss files
+css = custom_target(
+ 'scss',
+ input: files('main.scss'),
+ command: [sass, '@INPUT@', '@OUTPUT@'],
+ output: ['main.css'],
+)
+
+# compiling data files into a binary
+resource = import('gnome').compile_resources(
+ 'data',
+ files('gresource.xml'),
+ dependencies: [ui, css],
+ source_dir: meson.current_build_dir(),
+)
+
+executable(
+ meson.project_name(),
+ dependencies: dependencies,
+ sources: [vala_sources, resource],
+ link_args: ['-lm'], # Link math library
+ install: true,
+ install_dir: bindir,
+)