summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/meson.build6
-rw-r--r--meson_options.txt4
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/meson.build b/lib/meson.build
index 114eadde..672b4206 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -125,7 +125,11 @@ if chamelium.found()
lib_sources += 'igt_chamelium_stream.c'
endif
-srcdir = join_paths(meson.source_root(), 'tests')
+if get_option('srcdir') != ''
+ srcdir = join_paths(get_option('srcdir'), 'tests')
+else
+ srcdir = join_paths(meson.source_root(), 'tests')
+endif
lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
fallback : 'NO-GIT',
diff --git a/meson_options.txt b/meson_options.txt
index ff3abf08..bed63efa 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -50,3 +50,7 @@ option('use_rpath',
type : 'boolean',
value : false,
description : 'Set runpath on installed executables for libigt.so')
+
+option('srcdir',
+ type : 'string',
+ description : 'Override the source code path embedded inside target binaries (optional)')