[libcamera-devel] [PATCH v1 1/3] meson: Replace obselete join_paths() with '/' operator

Umang Jain umang.jain at ideasonboard.com
Fri Apr 30 14:40:41 CEST 2021


Hi

[snip]

On 4/30/21 5:55 PM, Kieran Bingham wrote:
>>   ]
>>   
>>   config_h.set('IPA_CONFIG_DIR',
>> -             '"' + join_paths(get_option('prefix'), ipa_sysconf_dir) +
>> -             ':' + join_paths(get_option('prefix'), ipa_data_dir) + '"')
>> +             '"' + get_option('prefix') / ipa_sysconf_dir +
>> +             ':' + get_option('prefix') / ipa_data_dir + '"')
>>   
>>   config_h.set('IPA_MODULE_DIR',
>> -             '"' + join_paths(get_option('prefix'), ipa_install_dir) + '"')
>> +             '"' + get_option('prefix') / ipa_install_dir + '"')
>>   
>>   subdir('libipa')
>>   
>> @@ -25,7 +25,7 @@ ipa_names = []
>>   foreach pipeline : pipelines
>>       if ipas.contains(pipeline)
>>           subdir(pipeline)
>> -        ipa_names += join_paths(ipa_install_dir, ipa_name + '.so')
>> +        ipa_names += ipa_install_dir / ipa_name / '.so'
> Careful here.
>
> Previously this was ipa_name + '.so'
> not
>   ipa_name, '.so'.
>
> We shouldn't use this as a join path - otherwise it might be creating
>
> ...libcamera/ipu3/.so
> instead of
> ...libcamera/ipu3.so
oh, this was missed badly, thanks for spotting. Patches were mostly 
compiled test -
>
>
>
>>       endif
>>   endforeach
>>   
>> diff --git a/src/ipa/raspberrypi/data/meson.build b/src/ipa/raspberrypi/data/meson.build
>> index 253fb9d7..92ad3272 100644
>> --- a/src/ipa/raspberrypi/data/meson.build
>> +++ b/src/ipa/raspberrypi/data/meson.build
>> @@ -10,4 +10,4 @@ conf_files = files([
>>   ])
>>   
>>   install_data(conf_files,
>> -             install_dir : join_paths(ipa_data_dir, 'raspberrypi'))
>> +             install_dir : ipa_data_dir / 'raspberrypi')
>> diff --git a/src/ipa/vimc/data/meson.build b/src/ipa/vimc/data/meson.build
>> index 6532662c..42ec651c 100644
>> --- a/src/ipa/vimc/data/meson.build
>> +++ b/src/ipa/vimc/data/meson.build
>> @@ -5,4 +5,4 @@ conf_files = files([
>>   ])
>>   
>>   install_data(conf_files,
>> -             install_dir : join_paths(ipa_data_dir, 'vimc'))
>> +             install_dir : ipa_data_dir / 'vimc')
>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
>> index e0a48aa2..99b09b3a 100644
>> --- a/src/libcamera/meson.build
>> +++ b/src/libcamera/meson.build
>> @@ -102,7 +102,7 @@ endforeach
>>   
>>   libcamera_sources += control_sources
>>   
>> -gen_version = join_paths(meson.source_root(), 'utils', 'gen-version.sh')
>> +gen_version = meson.source_root() / 'utils' / 'gen-version.sh'
>>   
>>   version_cpp = vcs_tag(command : [gen_version, meson.build_root()],
>>                         input : 'version.cpp.in',
>> diff --git a/src/libcamera/proxy/worker/meson.build b/src/libcamera/proxy/worker/meson.build
>> index 3796103e..40dada9d 100644
>> --- a/src/libcamera/proxy/worker/meson.build
>> +++ b/src/libcamera/proxy/worker/meson.build
>> @@ -1,6 +1,6 @@
>>   # SPDX-License-Identifier: CC0-1.0
>>   
>> -proxy_install_dir = join_paths(get_option('libexecdir'), 'libcamera')
>> +proxy_install_dir = get_option('libexecdir') / 'libcamera'
>>   
>>   # generate {pipeline}_ipa_proxy_worker.cpp
>>   foreach mojom : ipa_mojoms
>> @@ -25,4 +25,4 @@ foreach mojom : ipa_mojoms
>>   endforeach
>>   
>>   config_h.set('IPA_PROXY_DIR',
> Ohh another one to add to my paths summary perhaps ...
>
>> -             '"' + join_paths(get_option('prefix'), proxy_install_dir) + '"')
>> +             '"' + get_option('prefix') / proxy_install_dir + '"')
>>



More information about the libcamera-devel mailing list