Files
external_libcamera/src/libcamera/pipeline/meson.build
T
Laurent Pinchart e8fccaea46 meson: Fix usage of overwritten pipeline variable
When iterating over enabled pipelines and IPA modules, libcamera
descends into subdirectories in a recursive manner, which involves
nested loops. Both the outer and inner loops use the same loop variable
named 'pipeline'. As the outer loop uses the variable after descending
into the inner directory, it ends up using an incorrect value. Fix it by
moving all use of the variable before the subdir() call, and add a
comment that warns about the issue to avoid reintroducing it.

Fixes: e8526c0c2b ("ipa: meson: Allow nested IPA directory structures")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2023-05-09 06:35:47 +03:00

21 lines
507 B
Meson

# SPDX-License-Identifier: CC0-1.0
# Location of pipeline specific configuration files
pipeline_data_dir = libcamera_datadir / 'pipeline'
# Allow multi-level directory structuring for the pipeline handlers if needed.
subdirs = []
foreach pipeline : pipelines
pipeline = pipeline.split('/')[0]
if pipeline in subdirs
continue
endif
subdirs += pipeline
subdir(pipeline)
# Don't reuse the pipeline variable below, the subdirectory may have
# overwritten it.
endforeach