From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/unit/18 pkgconfig static/meson.build | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test cases/unit/18 pkgconfig static/meson.build (limited to 'test cases/unit/18 pkgconfig static/meson.build') diff --git a/test cases/unit/18 pkgconfig static/meson.build b/test cases/unit/18 pkgconfig static/meson.build new file mode 100644 index 0000000..d1b0fd5 --- /dev/null +++ b/test cases/unit/18 pkgconfig static/meson.build @@ -0,0 +1,37 @@ +project('pkg-config static', 'c') + +if build_machine.system() != 'windows' + prefix = meson.source_root() +else + # pkg-config files should not use paths with \ + prefix_parts = meson.source_root().split('\\') + # If the path is C:/foo/bar, convert it to /c/foo/bar so we can test if our + # automatic conversion to C:/foo/bar inside PkgConfigDependency is working. + if prefix_parts[0][1] == ':' + drive = prefix_parts[0][0] + else + drive = prefix_parts[0] + endif + new_parts = [] + foreach part : prefix_parts + if part != prefix_parts[0] + new_parts += part + endif + endforeach + prefix = '/@0@/@1@'.format(drive, '/'.join(new_parts)) +endif +message(prefix) + +# Escape spaces +prefix_parts = prefix.split(' ') +prefix = '\ '.join(prefix_parts) + +conf = configuration_data() +conf.set('PREFIX', prefix) +configure_file(input : 'foo.pc.in', + output : 'foo.pc', + configuration : conf) + +foo_dep = dependency('foo', static : true) + +test('footest', executable('foomain', 'main.c', dependencies : foo_dep)) -- cgit v1.2.3