meson: move machine configs
Move the machine configs to a subdirectory and allow systems with
missing configs to pass the build by default.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia1b0a505697e54124c6d854c7ee8f74db1fbf884
diff --git a/meson.build b/meson.build
index 4aedd81..8f93171 100644
--- a/meson.build
+++ b/meson.build
@@ -25,6 +25,8 @@
]),
language : 'cpp')
+fs = import('fs')
+
host_instances = '0'
if get_option('host-instances') != ''
host_instances = get_option('host-instances')
@@ -87,9 +89,14 @@
'post_desc.json'
]
foreach c : configfile
- file = join_paths(get_option('machine'), c)
- install_data(
- sources : file,
- install_dir : get_option('datadir') / 'lcd-debug' )
+ file = join_paths('configs', get_option('machine'), c)
+ if not fs.is_file(file)
+ warning('Missing config file: ' + file)
+ else
+ install_data(
+ sources : file,
+ install_dir : get_option('datadir') / 'lcd-debug'
+ )
+ endif
endforeach
endif