diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-03 13:26:41 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-11-11 23:06:49 +0530 |
| commit | 65edbf35ef728034a9bf4dfd304e6d42aac384b7 (patch) | |
| tree | efbdcdf74da2811194fc636276327a6c30bba64e /test cases/unit | |
| parent | 22f459a7dd8d6d815ade836b6ea9404572cbc92b (diff) | |
| download | meson-65edbf35ef728034a9bf4dfd304e6d42aac384b7.tar.gz | |
dependencies: Use shlex to parse pkg-config cflags and libs
Escaping spaces with '\ ' is the only way that works with both
pkg-config and pkgconf, so quote that way and unquote inside Meson.
This should work on all platforms.
Also fix the unit test to do the same.
https://github.com/pkgconf/pkgconf/issues/153
Diffstat (limited to 'test cases/unit')
| -rw-r--r-- | test cases/unit/17 pkgconfig static/foo.pc.in | 20 | ||||
| -rw-r--r-- | test cases/unit/17 pkgconfig static/meson.build | 4 |
2 files changed, 14 insertions, 10 deletions
diff --git a/test cases/unit/17 pkgconfig static/foo.pc.in b/test cases/unit/17 pkgconfig static/foo.pc.in index 2dfa7c19f..94d803154 100644 --- a/test cases/unit/17 pkgconfig static/foo.pc.in +++ b/test cases/unit/17 pkgconfig static/foo.pc.in @@ -1,10 +1,10 @@ -prefix=@PREFIX@
-libdir=${prefix}
-includedir=${prefix}/include
-datadir=${prefix}/data
-
-Name: libfoo
-Description: A foo library.
-Version: 1.0
-Libs: -L${libdir} -lfoo
-Cflags: -I${includedir}
+prefix=@PREFIX@ +libdir=${prefix} +includedir=${prefix}/include +datadir=${prefix}/data + +Name: libfoo +Description: A foo library. +Version: 1.0 +Libs: -L${libdir} -lfoo +Cflags: -I${includedir} diff --git a/test cases/unit/17 pkgconfig static/meson.build b/test cases/unit/17 pkgconfig static/meson.build index 2327a5081..caeb4aae2 100644 --- a/test cases/unit/17 pkgconfig static/meson.build +++ b/test cases/unit/17 pkgconfig static/meson.build @@ -8,6 +8,10 @@ else prefix = '/'.join(prefix_parts) endif +# Escape spaces +prefix_parts = prefix.split(' ') +prefix = '\ '.join(prefix_parts) + conf = configuration_data() conf.set('PREFIX', prefix) configure_file(input : 'foo.pc.in', |
