diff options
| author | xengineering <me@xengineering.eu> | 2025-12-09 21:10:55 +0100 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2025-12-09 21:10:55 +0100 |
| commit | 0d7c74fb805837c30c60fa14ade7c42eedfdef16 (patch) | |
| tree | 8aaffc319ec4f32f5d55bc703dfa02dc0c0e070e | |
| parent | 1db9a99d2a62747a241315733617dfef46bc59c8 (diff) | |
| download | homematic-go-0d7c74fb805837c30c60fa14ade7c42eedfdef16.tar homematic-go-0d7c74fb805837c30c60fa14ade7c42eedfdef16.tar.zst homematic-go-0d7c74fb805837c30c60fa14ade7c42eedfdef16.zip | |
Add Meson build system
This adds a familiar and simple method to build, test and run the
software of this repository.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | homematic/meson.build | 4 | ||||
| -rw-r--r-- | meson.build | 37 |
3 files changed, 42 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/homematic/meson.build b/homematic/meson.build new file mode 100644 index 0000000..5a35437 --- /dev/null +++ b/homematic/meson.build @@ -0,0 +1,4 @@ +homematic = [ + meson.current_source_dir() / 'xmlrpc.go', + meson.current_source_dir() / 'device.go', +] diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..4de00bd --- /dev/null +++ b/meson.build @@ -0,0 +1,37 @@ +project('homematic-go') + +go = find_program('go', required : true) + +subdir('homematic') + +homematic_go = custom_target( + input : [ + meson.current_source_dir() / 'main.go', + ], + output : 'homematic-go', + command : [ + go, + 'build', + '-o', + '@OUTPUT@', + '@INPUT@', + ], + depend_files : [ + homematic, + ], + build_by_default : true, +) + +run_target( + 'run', + command : [ + homematic_go, + ], +) + +test( + 'unit-tests', + go, + args: ['test', './...'], + workdir: meson.current_source_dir() +) |
