[libcamera-devel] [RFC PATCH 5/8] src: ipa: meson: Re-use existing system paths

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Nov 23 17:43:16 CET 2020


Make use of the new system path variables and map the ipa paths upon the
libcamera system paths.

While we're at it, make use of the new shorter syntax for join_paths().

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/ipa/meson.build | 16 +++++++---------
 src/meson.build     |  2 ++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/ipa/meson.build b/src/ipa/meson.build
index 5a5de267c147..c1dc1ce6fa90 100644
--- a/src/ipa/meson.build
+++ b/src/ipa/meson.build
@@ -1,19 +1,17 @@
 # SPDX-License-Identifier: CC0-1.0
 
-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,
 ]
 
-config_h.set('IPA_CONFIG_DIR',
-             '"' + join_paths(get_option('prefix'), ipa_sysconf_dir) +
-             ':' + join_paths(get_option('prefix'), ipa_data_dir) + '"')
+ipa_install_dir = libcamera_libdir
+ipa_data_dir = libcamera_datadir / 'ipa'
+ipa_sysconf_dir = libcamera_sysconfdir / 'ipa'
+
+config_h.set('IPA_CONFIG_DIR', '"' + prefix / ipa_sysconf_dir +
+                               ':' + prefix / ipa_data_dir + '"')
 
-config_h.set('IPA_MODULE_DIR',
-             '"' + join_paths(get_option('prefix'), ipa_install_dir) + '"')
+config_h.set('IPA_MODULE_DIR', '"' + prefix / ipa_install_dir + '"')
 
 subdir('libipa')
 
diff --git a/src/meson.build b/src/meson.build
index b1b3514f6ed7..c7430805fd86 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,10 +2,12 @@
 
 # Handle system paths
 datadir = get_option('datadir')
+libdir = get_option('libdir')
 prefix = get_option('prefix')
 sysconfdir = get_option('sysconfdir')
 
 libcamera_datadir = datadir / 'libcamera'
+libcamera_libdir = libdir / 'libcamera'
 libcamera_sysconfdir = sysconfdir / 'libcamera'
 
 config_h.set('LIBCAMERA_SYSCONF_DIR', '"' + prefix / libcamera_sysconfdir + '"')
-- 
2.25.1



More information about the libcamera-devel mailing list