summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 04:04:48 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:41 +0300
commit53d3f4152af5a943d84f60cb8a02d791730c99b1 (patch)
tree63c1d41d4079de1a02233df5e724878f44ca32ba /src/ipa
parent78f685df8a5727ebd8978d05aef963533808b6f5 (diff)
libcamera: ipa_proxy: Provide suport for IPA configuration files
IPA modules may require configuration files, which may be stored in different locations in the file system. To standardize file locations between all IPAs and pipeline handlers, provide a helper function to locate a configuration file by searching in the following directories: - All directories specified in the LIBCAMERA_IPA_CONFIG_PATH environment variable ; or - In the source tree if libcamera is not installed ; otherwise - In standard system locations (etc and share directories). When stored in the source tree, configuration files shall be located in a 'data' subdirectory of their respective IPA directory. More locations, or extensions to the mechanism, may be implemented later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r--src/ipa/meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipa/meson.build b/src/ipa/meson.build
index cb4e3ab3..145bf810 100644
--- a/src/ipa/meson.build
+++ b/src/ipa/meson.build
@@ -1,10 +1,16 @@
ipa_install_dir = join_paths(get_option('libdir'), 'libcamera')
+ipa_data_dir = join_paths(get_option('datadir'), 'libcamera', 'ipa')
+ipa_sysconf_dir = join_paths(get_option('sysconfdir'), 'libcamera', 'ipa')
ipa_includes = [
libcamera_includes,
libcamera_internal_includes,
]
+config_h.set('IPA_CONFIG_DIR',
+ '"' + join_paths(get_option('prefix'), ipa_sysconf_dir) +
+ ':' + join_paths(get_option('prefix'), ipa_data_dir) + '"')
+
config_h.set('IPA_MODULE_DIR',
'"' + join_paths(get_option('prefix'), ipa_install_dir) + '"')