[libcamera-devel] [RFC PATCH 4/8] src: meson: Define system paths

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


Define libcamera specific system paths for use within the library code
base. These can be used to identify system configuration files and
shared data.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/meson.build | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/meson.build b/src/meson.build
index 8c7449f9b8a0..b1b3514f6ed7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,17 @@
 # SPDX-License-Identifier: CC0-1.0
 
+# Handle system paths
+datadir = get_option('datadir')
+prefix = get_option('prefix')
+sysconfdir = get_option('sysconfdir')
+
+libcamera_datadir = datadir / 'libcamera'
+libcamera_sysconfdir = sysconfdir / 'libcamera'
+
+config_h.set('LIBCAMERA_SYSCONF_DIR', '"' + prefix / libcamera_sysconfdir + '"')
+config_h.set('LIBCAMERA_DATA_DIR', '"' + prefix / libcamera_datadir + '"')
+
+# Module Signing
 openssl = find_program('openssl', required : true)
 if openssl.found()
     ipa_priv_key = custom_target('ipa-priv-key',
-- 
2.25.1



More information about the libcamera-devel mailing list