summaryrefslogtreecommitdiff
path: root/include/libcamera/ipa/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'include/libcamera/ipa/meson.build')
-rw-r--r--include/libcamera/ipa/meson.build45
1 files changed, 30 insertions, 15 deletions
diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build
index 442ca3dd..3352d08f 100644
--- a/include/libcamera/ipa/meson.build
+++ b/include/libcamera/ipa/meson.build
@@ -9,7 +9,7 @@ libcamera_ipa_headers = files([
])
install_headers(libcamera_ipa_headers,
- subdir: libcamera_ipa_include_dir)
+ subdir : libcamera_ipa_include_dir)
libcamera_generated_ipa_headers = []
@@ -60,14 +60,14 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',
'./' +'@INPUT@'
])
-ipa_mojom_files = [
- 'ipu3.mojom',
- 'raspberrypi.mojom',
- 'rkisp1.mojom',
- 'vimc.mojom',
-]
-
-ipa_mojoms = []
+# Mapping from pipeline handler name to mojom file
+pipeline_ipa_mojom_mapping = {
+ 'ipu3': 'ipu3.mojom',
+ 'rkisp1': 'rkisp1.mojom',
+ 'rpi/vc4': 'raspberrypi.mojom',
+ 'simple': 'soft.mojom',
+ 'vimc': 'vimc.mojom',
+}
#
# Generate headers from templates.
@@ -75,14 +75,23 @@ ipa_mojoms = []
# TODO Define per-pipeline ControlInfoMap with yaml?
-foreach file : ipa_mojom_files
+ipa_mojoms = []
+mojoms_built = []
+foreach pipeline, file : pipeline_ipa_mojom_mapping
name = file.split('.')[0]
- if name not in pipelines
+ # Avoid building duplicate mojom interfaces with the same interface file
+ if name in mojoms_built
continue
endif
- # {pipeline}.mojom-module
+ if pipeline not in pipelines
+ continue
+ endif
+
+ mojoms_built += name
+
+ # {interface}.mojom-module
mojom = custom_target(name + '_mojom_module',
input : file,
output : file + '-module',
@@ -94,7 +103,7 @@ foreach file : ipa_mojom_files
'--mojoms', '@INPUT@'
])
- # {pipeline}_ipa_interface.h
+ # {interface}_ipa_interface.h
header = custom_target(name + '_ipa_interface_h',
input : mojom,
output : name + '_ipa_interface.h',
@@ -110,7 +119,7 @@ foreach file : ipa_mojom_files
'./' +'@INPUT@'
])
- # {pipeline}_ipa_serializer.h
+ # {interface}_ipa_serializer.h
serializer = custom_target(name + '_ipa_serializer_h',
input : mojom,
output : name + '_ipa_serializer.h',
@@ -124,7 +133,7 @@ foreach file : ipa_mojom_files
'./' +'@INPUT@'
])
- # {pipeline}_ipa_proxy.h
+ # {interface}_ipa_proxy.h
proxy_header = custom_target(name + '_proxy_h',
input : mojom,
output : name + '_ipa_proxy.h',
@@ -146,6 +155,12 @@ foreach file : ipa_mojom_files
libcamera_generated_ipa_headers += [header, serializer, proxy_header]
endforeach
+ipa_mojom_files = []
+foreach pipeline, file : pipeline_ipa_mojom_mapping
+ if file not in ipa_mojom_files
+ ipa_mojom_files += file
+ endif
+endforeach
ipa_mojom_files = files(ipa_mojom_files)
# Pass this to the documentation generator in src/libcamera/ipa