summaryrefslogtreecommitdiff
path: root/web/meson.build
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-04-03 18:13:16 +0200
committerxengineering <me@xengineering.eu>2025-04-03 18:16:47 +0200
commit04b26d18765611b256c7d15568d7605412ffcd11 (patch)
tree9eb09fd0683cf777bd3dd237a434f41b6fd24e01 /web/meson.build
parentcfb844a53e6e008aaf3b7d1be3639559609d5540 (diff)
downloadiot-contact-04b26d18765611b256c7d15568d7605412ffcd11.tar
iot-contact-04b26d18765611b256c7d15568d7605412ffcd11.tar.zst
iot-contact-04b26d18765611b256c7d15568d7605412ffcd11.zip
WIP: web: Add meson build system
TODO: Make sure ninja re-calls hugo if hugo.toml or one of the HTML files are touched. CMake has some disadvantages when building subprojects like with `ExternalProject`. Furthermore the language is sometimes hard to read, hard to write and not so much appreciated. This is a little test if meson might perform better. If successful this project might switch to meson for all parts except the Zephyr builds.
Diffstat (limited to 'web/meson.build')
-rw-r--r--web/meson.build21
1 files changed, 21 insertions, 0 deletions
diff --git a/web/meson.build b/web/meson.build
new file mode 100644
index 0000000..743aa77
--- /dev/null
+++ b/web/meson.build
@@ -0,0 +1,21 @@
+hugo_toml = 'hugo.toml'
+
+configure_file(
+ input: hugo_toml,
+ output: hugo_toml,
+ copy: true,
+)
+
+subdir('layouts')
+
+custom_target('website',
+ output: ['public'],
+ command: [
+ 'hugo',
+ '--source',
+ meson.current_build_dir(),
+ '--destination',
+ meson.current_build_dir() / 'public',
+ ],
+ build_by_default: true,
+)