meson: Fix mismatch in controls and properties generated file names
The header for controls and properties are generated from the control_ids.h.in and property_ids.h.in templates respectively, and the generated files are named control_ids.h and property_ids.h. For sources, the templates are named control_ids.cpp.in and property_ids.cpp.in, but the output files are named controls_ids.cpp and properties_ids.cpp. This discrepancy causes confusion. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
b8d318ebeb
commit
cbffcbe362
1 changed files with 13 additions and 9 deletions
|
@ -129,21 +129,25 @@ endif
|
||||||
control_sources = []
|
control_sources = []
|
||||||
|
|
||||||
controls_mode_files = {
|
controls_mode_files = {
|
||||||
'controls' : controls_files,
|
'controls': [
|
||||||
'properties' : properties_files,
|
controls_files,
|
||||||
|
'control_ids.cpp',
|
||||||
|
],
|
||||||
|
'properties': [
|
||||||
|
properties_files,
|
||||||
|
'property_ids.cpp',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach mode, input_files : controls_mode_files
|
foreach mode, inout_files : controls_mode_files
|
||||||
if mode == 'controls'
|
input_files = inout_files[0]
|
||||||
template_file = files('control_ids.cpp.in')
|
output_file = inout_files[1]
|
||||||
else
|
|
||||||
template_file = files('property_ids.cpp.in')
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
template_file = files(output_file + '.in')
|
||||||
ranges_file = files('control_ranges.yaml')
|
ranges_file = files('control_ranges.yaml')
|
||||||
control_sources += custom_target(mode + '_cpp',
|
control_sources += custom_target(mode + '_cpp',
|
||||||
input : input_files,
|
input : input_files,
|
||||||
output : mode + '_ids.cpp',
|
output : output_file,
|
||||||
command : [gen_controls, '-o', '@OUTPUT@',
|
command : [gen_controls, '-o', '@OUTPUT@',
|
||||||
'--mode', mode, '-t', template_file,
|
'--mode', mode, '-t', template_file,
|
||||||
'-r', ranges_file, '@INPUT@'])
|
'-r', ranges_file, '@INPUT@'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue