diff options
Diffstat (limited to 'test cases/common')
-rw-r--r-- | test cases/common/44 pkgconfig-gen/answer.c | 3 | ||||
-rw-r--r-- | test cases/common/44 pkgconfig-gen/foo.c | 7 | ||||
-rw-r--r-- | test cases/common/44 pkgconfig-gen/meson.build | 14 | ||||
-rw-r--r-- | test cases/common/44 pkgconfig-gen/test.json | 1 |
4 files changed, 22 insertions, 3 deletions
diff --git a/test cases/common/44 pkgconfig-gen/answer.c b/test cases/common/44 pkgconfig-gen/answer.c new file mode 100644 index 0000000..df5f54f --- /dev/null +++ b/test cases/common/44 pkgconfig-gen/answer.c @@ -0,0 +1,3 @@ +int answer_to_life_the_universe_and_everything(void) { + return 42; +} diff --git a/test cases/common/44 pkgconfig-gen/foo.c b/test cases/common/44 pkgconfig-gen/foo.c new file mode 100644 index 0000000..83bb06a --- /dev/null +++ b/test cases/common/44 pkgconfig-gen/foo.c @@ -0,0 +1,7 @@ +#include"simple.h" + +int answer_to_life_the_universe_and_everything (void); + +int simple_function(void) { + return answer_to_life_the_universe_and_everything(); +} diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build index 7021d5d..5e9141f 100644 --- a/test cases/common/44 pkgconfig-gen/meson.build +++ b/test cases/common/44 pkgconfig-gen/meson.build @@ -42,13 +42,21 @@ test('pkgconfig-validation', pkgconfig, args: ['--validate', 'simple'], env: [ 'PKG_CONFIG_PATH=' + meson.current_build_dir() + '/meson-private' ]) +answerlib = shared_library('answer', 'answer.c') + +pkgg.generate(answerlib, + name : 'libanswer', + description : 'An answer library.', +) + # Test that name_prefix='' and name='libfoo' results in '-lfoo' -lib2 = shared_library('libfoo', 'simple.c', +lib2 = shared_library('libfoo', 'foo.c', + link_with: answerlib, name_prefix : '', version : libver) -pkgg.generate( - libraries : lib2, +pkgg.generate(lib2, + libraries : [lib2, answerlib], name : 'libfoo', version : libver, description : 'A foo library.', diff --git a/test cases/common/44 pkgconfig-gen/test.json b/test cases/common/44 pkgconfig-gen/test.json index 8add563..c7bdd43 100644 --- a/test cases/common/44 pkgconfig-gen/test.json +++ b/test cases/common/44 pkgconfig-gen/test.json @@ -3,6 +3,7 @@ {"type": "file", "file": "usr/include/simple.h"}, {"type": "file", "file": "usr/lib/libstat2.a"}, {"type": "file", "file": "usr/lib/pkgconfig/simple.pc"}, + {"type": "file", "file": "usr/lib/pkgconfig/libanswer.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/libfoo.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/libhello.pc"}, {"type": "file", "file": "usr/lib/pkgconfig/libhello_nolib.pc"}, |