diff options
| author | xengineering <me@xengineering.eu> | 2025-04-03 18:13:16 +0200 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2025-04-03 18:16:47 +0200 | 
| commit | 04b26d18765611b256c7d15568d7605412ffcd11 (patch) | |
| tree | 9eb09fd0683cf777bd3dd237a434f41b6fd24e01 | |
| parent | cfb844a53e6e008aaf3b7d1be3639559609d5540 (diff) | |
| download | iot-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.
| -rw-r--r-- | meson.build | 3 | ||||
| -rw-r--r-- | web/layouts/meson.build | 12 | ||||
| -rw-r--r-- | web/meson.build | 21 | 
3 files changed, 36 insertions, 0 deletions
| diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..537d067 --- /dev/null +++ b/meson.build @@ -0,0 +1,3 @@ +project('iot-contact') + +subdir('web') diff --git a/web/layouts/meson.build b/web/layouts/meson.build new file mode 100644 index 0000000..e582474 --- /dev/null +++ b/web/layouts/meson.build @@ -0,0 +1,12 @@ +sources = [ +  'baseof.html', +  'home.html', +] + +foreach source : sources +  configure_file( +    input: source, +    output: source, +    copy: true, +  ) +endforeach 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, +) | 
