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 /meson.build | |
| 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.
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 37 |
1 files changed, 37 insertions, 0 deletions
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() +) |
