[libcamera-devel] [PATCH] libcamera: Move generated control and properry ids to the API

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Mar 2 17:35:50 CET 2020


As part of updating controls to support properties, the commit
f870591a9bf5 ("libcamera: properties: Add location property")
inadvertently moved the generated headers out of the libcamera_api
dependency generation.

This allowed a race condition to occur in builds where objects are
attempted to be built before the API definitions had been generated.

Move the headers out of the libcamera_sources variable and into the
libcamera_api variable to match the other headers in this location.

Fixes: f870591a9bf5 ("libcamera: properties: Add location property")

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 include/libcamera/meson.build | 2 ++
 src/libcamera/meson.build     | 1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index f58c02d2cf35..c02e1d250aff 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -43,6 +43,8 @@ foreach header : control_source_files
                                      install_dir : join_paths('include', include_dir))
 endforeach
 
+libcamera_api += control_headers
+
 gen_header = files('gen-header.sh')
 
 libcamera_h = custom_target('gen-header',
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 88658ac563f7..b3a6a1aad659 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -80,7 +80,6 @@ foreach source : control_source_files
                                      command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@'])
 endforeach
 
-libcamera_sources += control_headers
 libcamera_sources += control_sources
 
 gen_version = join_paths(meson.source_root(), 'utils', 'gen-version.sh')
-- 
2.20.1



More information about the libcamera-devel mailing list