summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-05-23 18:23:01 +0200
committerXinfengZhang <carl.zhang@intel.com>2020-06-05 15:16:46 +0800
commitede255b8f6b9c21c17cd74b654e550b9704874fa (patch)
treea045baac3e61b872d8b2661cf71f0eb67a92b335
parentccf3b081ff3d2b0784cd66daf04bbc317277cf8b (diff)
downloadlibva-ede255b8f6b9c21c17cd74b654e550b9704874fa.tar.gz
meson: Allow for libdir and includedir to be absolute paths
Meson allows to use absolute paths for libdir and includedir [0]. But if they're absolute paths one must not append the prefix. The join_paths() function [1] nicely supports both relative and absolute paths. This is e.g. important for Nixpkgs (i.e. Nix(OS)) where binaries and library files are usually installed under different prefixes. [0]: https://github.com/mesonbuild/meson/commit/a513bcfde613f2a0403f7b0cd34d4bd62674c1d8 [1]: https://mesonbuild.com/Reference-manual.html#join_paths Signed-off-by: Michael Weiss <dev.primeos@gmail.com>
-rw-r--r--meson.build2
-rw-r--r--pkgconfig/meson.build4
2 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index c5963b1..32c8358 100644
--- a/meson.build
+++ b/meson.build
@@ -65,7 +65,7 @@ libva_lt_version = '@0@.@1@.@2@'.format(libva_lt_current,
driverdir = get_option('driverdir')
if driverdir == ''
- driverdir = '@0@/@1@/@2@'.format(get_option('prefix'), get_option('libdir'), 'dri')
+ driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
endif
configinc = include_directories('.')
diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build
index b7f7015..ca344ce 100644
--- a/pkgconfig/meson.build
+++ b/pkgconfig/meson.build
@@ -2,8 +2,8 @@ pkgconf = configuration_data()
pkgconf.set('prefix', get_option('prefix'))
pkgconf.set('exec_prefix', '${prefix}')
-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
+pkgconf.set('includedir', join_paths(get_option('prefix'), get_option('includedir')))
pkgconf.set('LIBVA_VERSION', libva_version)
pkgconf.set('VA_API_VERSION', va_api_version)
pkgconf.set('LIBVA_DRIVERS_PATH', driverdir)