aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-04-25 07:56:49 +1000
committerJussi Pakkanen <jpakkane@gmail.com>2017-05-11 00:13:30 +0300
commit7ed19902be3f866ff599822b56cea5a34ec661d1 (patch)
tree85f4adc5e085a105ac81f9280ef47d6c85ebaf3f /run_unittests.py
parent1aa68cf6e3b05b63bf858aa005c34aeea362e3f9 (diff)
downloadmeson-7ed19902be3f866ff599822b56cea5a34ec661d1.zip
meson-7ed19902be3f866ff599822b56cea5a34ec661d1.tar.gz
meson-7ed19902be3f866ff599822b56cea5a34ec661d1.tar.bz2
pkgconfig: add suppport for custom variables during generation
Usage: pkgconfig.generate( ... description : 'A library with custom variables.', variables : ['foo=bar', 'datadir=${prefix}/data'] ) The variables 'prefix', 'libdir' and 'includedir' are reserved, meson will fail with an error message. Variables can reference each other with the pkgconfig notation, e.g. variables : ['datadir=${prefix}/data', 'otherdatadir=${datadir}/other'] meson does not check this for correctness or that the referenced variable exists, we merely keep the same order as specified.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index ed98cad..86e5a98 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1174,6 +1174,8 @@ class LinuxlikeTests(BasePlatformTests):
self.assertTrue(simple_dep.found())
self.assertEqual(simple_dep.get_version(), '1.0')
self.assertIn('-lfoo', simple_dep.get_link_args())
+ self.assertEqual(simple_dep.get_pkgconfig_variable('foo'), 'bar')
+ self.assertPathEqual(simple_dep.get_pkgconfig_variable('datadir'), '/usr/data')
def test_vala_c_warnings(self):
'''