summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-05-23 23:48:15 +0200
committerxengineering <me@xengineering.eu>2026-05-23 23:48:15 +0200
commit4db5f4ae91cc5b9139e3f2e1208e2ec032a89ebf (patch)
tree2fce9036b48836e4ab6b994c2ec717136445137c /meson.build
parent0c2903126aa2df80d1ea40295df6365ea37b7651 (diff)
downloadfinserv-4db5f4ae91cc5b9139e3f2e1208e2ec032a89ebf.tar
finserv-4db5f4ae91cc5b9139e3f2e1208e2ec032a89ebf.tar.zst
finserv-4db5f4ae91cc5b9139e3f2e1208e2ec032a89ebf.zip
Add global Meson build system
This commit fully introduces Meson as a build system for this repository. It makes sure the frontend page is built with Hugo before the Go executable is built and embeds the frontend.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 451844c..5ee335b 100644
--- a/meson.build
+++ b/meson.build
@@ -3,4 +3,24 @@ project(
version : files('VERSION.txt'),
)
+go = find_program('go', required : true)
+
subdir('frontend')
+
+finserv_linux_amd64 = custom_target(
+ input : [
+ meson.current_source_dir() / 'main.go',
+ meson.current_source_dir() / 'handlers.go',
+ ],
+ output : 'finserv-linux-amd64',
+ env : {'GOOS': 'linux', 'GOARCH': 'amd64'},
+ command : [
+ go,
+ 'build',
+ '-o',
+ '@OUTPUT@',
+ '@INPUT@',
+ ],
+ depends : frontend,
+ build_by_default : true,
+)