summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 05:29:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:34 +0300
commitcc15ab43161b805bade5220e2769908d4ceefeff (patch)
treea9ec6feaac0377c14a7541b7ec58fd6fddd5d13d /meson.build
parent6e1cd1394e5d73dfd4c4334cbf8beee79072de21 (diff)
libcamera: utils: Add a function to retrieve the libcamera source tree
Similarly to libcameraBuildPath(), there's a need to locate resources within the source tree when running libcamera without installing it. Support this use case with a new utils::libcameraSourcePath() function. The implementation uses a symlink from the build root to the source root in order to avoid hardcoding the path to the source root in the libcamera.so binary. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c6e6a934..9fc5cc52 100644
--- a/meson.build
+++ b/meson.build
@@ -93,6 +93,12 @@ if get_option('test')
subdir('test')
endif
+# Create a symlink from the build root to the source root. This is used when
+# running libcamera from the build directory to locate resources in the source
+# directory (such as IPA configuration files).
+run_command('ln', '-fsT', meson.source_root(),
+ join_paths(meson.build_root(), 'source'))
+
configure_file(output : 'config.h', configuration : config_h)
pkg_mod = import('pkgconfig')