meson: Replace hack with usage of '@BASENAME@'
Starting with meson 0.59, the custom_target() function substitutes '@BASENAME@' in the output parameter with the input file name, with the extension removed. This is exactly what we implement manually when generating the IPA interface .cpp files. Furthermore, starting with meson 0.60, the 'name' positional parameter to the custom_target() function is optional, and defaults to the basename of the output file (including the extension). This is exactly the name we compute manually and pass to the function. As libcamera requires meson 0.60 or newer, we can depend on those two features and drop manual computation of the base name. This fixes a warning with recent meson versions that complain that passing a file object to the format() function is a broken feature: WARNING: Broken features used: * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'} Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
1c56d2a2cd
commit
41d6e6e5c1
1 changed files with 2 additions and 5 deletions
|
@ -3,13 +3,10 @@
|
||||||
libcamera_ipa_interfaces = []
|
libcamera_ipa_interfaces = []
|
||||||
|
|
||||||
foreach file : ipa_mojom_files
|
foreach file : ipa_mojom_files
|
||||||
name = '@0@'.format(file).split('/')[-1].split('.')[0]
|
|
||||||
|
|
||||||
# {pipeline}_ipa_interface.cpp
|
# {pipeline}_ipa_interface.cpp
|
||||||
libcamera_ipa_interfaces += \
|
libcamera_ipa_interfaces += \
|
||||||
custom_target(name + '_ipa_interface_cpp',
|
custom_target(input : file,
|
||||||
input : file,
|
output : '@BASENAME@_ipa_interface.cpp',
|
||||||
output : name + '_ipa_interface.cpp',
|
|
||||||
command : [
|
command : [
|
||||||
mojom_docs_extractor,
|
mojom_docs_extractor,
|
||||||
'-o', '@OUTPUT@', '@INPUT@'
|
'-o', '@OUTPUT@', '@INPUT@'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue