[igt-dev] [PATCH i-g-t 1/1] meson: Use absolute path for IGT_DATADIR

Petri Latvala petri.latvala at intel.com
Mon Jan 22 13:04:07 UTC 2018


IGT_DATADIR needs to be an absolute path instead of relative to
prefix or data files can only be found if cwd is exactly prefix.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104723
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
 lib/meson.build   | 2 +-
 tools/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index b3bbc311..94ea0799 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -159,7 +159,7 @@ foreach f: lib_sources
 	include_directories: inc,
 	dependencies : lib_deps,
 	c_args : [
-	    '-DIGT_DATADIR="@0@"'.format(datadir),
+	    '-DIGT_DATADIR="@0@"'.format(join_paths(prefix, datadir)),
 	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
 	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
 	])
diff --git a/tools/meson.build b/tools/meson.build
index acd9242d..a96735c2 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -76,7 +76,7 @@ executable('intel_reg', sources : intel_reg_src,
 	   dependencies : tool_deps,
 	   install : true,
 	   c_args : [
-	     '-DIGT_DATADIR="@0@"'.format(datadir),
+	     '-DIGT_DATADIR="@0@"'.format(join_paths(prefix, datadir)),
 	   ])
 
 install_data('intel_gpu_abrt', install_dir : bindir)
-- 
2.14.1



More information about the igt-dev mailing list