aboutsummaryrefslogtreecommitdiff
path: root/test cases/linuxlike
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-11-20 22:00:25 +0100
committerIñigo Martínez <inigomartinez@gmail.com>2017-11-20 22:00:25 +0100
commit935ca128220806911821c5694e7856c0d343806a (patch)
tree316f10425bf0b1a9f24057370992d4e1bdae6662 /test cases/linuxlike
parenteba69723064325a8b7f25f5f6a099ebd60fa71e8 (diff)
downloadmeson-935ca128220806911821c5694e7856c0d343806a.zip
meson-935ca128220806911821c5694e7856c0d343806a.tar.gz
meson-935ca128220806911821c5694e7856c0d343806a.tar.bz2
dependencies: Allow pkg-config to define variables
pkg-config enables to define variables by using the define-variable option. This allows some packages to redefine relative paths, so files can be installed in the same relative paths but under prefix.
Diffstat (limited to 'test cases/linuxlike')
-rw-r--r--test cases/linuxlike/1 pkg-config/meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/test cases/linuxlike/1 pkg-config/meson.build b/test cases/linuxlike/1 pkg-config/meson.build
index 7e43821..8a4940b 100644
--- a/test cases/linuxlike/1 pkg-config/meson.build
+++ b/test cases/linuxlike/1 pkg-config/meson.build
@@ -17,6 +17,8 @@ test('zlibtest', exe)
zprefix = dep.get_pkgconfig_variable('prefix') # Always set but we can't be sure what the value is.
# pkg-config returns empty string for not defined variables
assert(dep.get_pkgconfig_variable('nonexisting') == '', 'Value of unknown variable is not empty.')
+# pkg-config is able to replace variables
+assert(dep.get_pkgconfig_variable('includedir', define_variable: ['prefix', '/tmp']) == '/tmp/include', 'prefix variable has not been replaced.')
# Test that dependencies of dependencies work.
dep2 = declare_dependency(dependencies : dep)