aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-05-01 17:54:54 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-05-02 11:46:47 +0000
commitbadbfa125ca1ceb1d159d0a336c161bf0a8a3b6f (patch)
tree7d0fa7270dfe514bf9cda90f511f652458576289 /test cases
parent2b5766980b960d0de6b142fe4d266be88f751b77 (diff)
downloadmeson-badbfa125ca1ceb1d159d0a336c161bf0a8a3b6f.zip
meson-badbfa125ca1ceb1d159d0a336c161bf0a8a3b6f.tar.gz
meson-badbfa125ca1ceb1d159d0a336c161bf0a8a3b6f.tar.bz2
pkgconfig: Don't expose internal libraries in .pc files
Libraries that have been linked with link_whole: are internal implementation details and should never be exposed to the outside world in either Libs: or Libs.private: Closes https://github.com/mesonbuild/meson/issues/3509
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/31 pkgconfig format/meson.build5
-rw-r--r--test cases/unit/31 pkgconfig format/somelib.c4
-rw-r--r--test cases/unit/31 pkgconfig format/someret.c3
3 files changed, 9 insertions, 3 deletions
diff --git a/test cases/unit/31 pkgconfig format/meson.build b/test cases/unit/31 pkgconfig format/meson.build
index bbd3b12..ea00f5d 100644
--- a/test cases/unit/31 pkgconfig format/meson.build
+++ b/test cases/unit/31 pkgconfig format/meson.build
@@ -8,10 +8,11 @@ endif
pkgg = import('pkgconfig')
-l = shared_library('something', 'somelib.c')
+s = static_library('returner', 'someret.c')
+l = library('something', 'somelib.c', link_whole: s)
pkgg.generate(libraries: l,
version: '1.0',
name: 'libsomething',
description: 'A library that does something',
- requires: 'gobject-2.0 >= 2.54, gio-2.0 >= 2.54')
+ requires: 'gobject-2.0 >= 2.0, gio-2.0 >= 2.0')
diff --git a/test cases/unit/31 pkgconfig format/somelib.c b/test cases/unit/31 pkgconfig format/somelib.c
index 6d876c8..0558024 100644
--- a/test cases/unit/31 pkgconfig format/somelib.c
+++ b/test cases/unit/31 pkgconfig format/somelib.c
@@ -1,5 +1,7 @@
#include<stdio.h>
+int get_returnvalue (void);
+
int some_func() {
- return 0;
+ return get_returnvalue();
}
diff --git a/test cases/unit/31 pkgconfig format/someret.c b/test cases/unit/31 pkgconfig format/someret.c
new file mode 100644
index 0000000..69f4299
--- /dev/null
+++ b/test cases/unit/31 pkgconfig format/someret.c
@@ -0,0 +1,3 @@
+int get_returnvalue (void) {
+ return 0;
+}