diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/unit/27 pkgconfig usage/dependency | |
parent | Initial commit. (diff) | |
download | meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/unit/27 pkgconfig usage/dependency')
4 files changed, 37 insertions, 0 deletions
diff --git a/test cases/unit/27 pkgconfig usage/dependency/meson.build b/test cases/unit/27 pkgconfig usage/dependency/meson.build new file mode 100644 index 0000000..ee0f1da --- /dev/null +++ b/test cases/unit/27 pkgconfig usage/dependency/meson.build @@ -0,0 +1,24 @@ +project('pkgconfig dep', 'c', + version : '1.0.0') + +# This is not used in the code, only to check that it does not +# leak out to --libs. +glib_dep = dependency('glib-2.0') + +pkgconfig = import('pkgconfig') + +intlib = static_library('libpkgdep-int', 'privatelib.c') +intdep = declare_dependency(link_with : intlib) + +lib = shared_library('pkgdep', 'pkgdep.c', + dependencies : [glib_dep, intdep], + install : true) + +install_headers('pkgdep.h') + +pkgconfig.generate( + filebase : 'libpkgdep', + name : 'Libpkgdep', + description : 'Sample pkgconfig dependency library', + version : meson.project_version(), + libraries : lib) diff --git a/test cases/unit/27 pkgconfig usage/dependency/pkgdep.c b/test cases/unit/27 pkgconfig usage/dependency/pkgdep.c new file mode 100644 index 0000000..bd5c3f4 --- /dev/null +++ b/test cases/unit/27 pkgconfig usage/dependency/pkgdep.c @@ -0,0 +1,7 @@ +#include<pkgdep.h> + +int internal_thingy(); + +int pkgdep() { + return internal_thingy(); +} diff --git a/test cases/unit/27 pkgconfig usage/dependency/pkgdep.h b/test cases/unit/27 pkgconfig usage/dependency/pkgdep.h new file mode 100644 index 0000000..16d622e --- /dev/null +++ b/test cases/unit/27 pkgconfig usage/dependency/pkgdep.h @@ -0,0 +1,3 @@ +#pragma once + +int pkgdep(); diff --git a/test cases/unit/27 pkgconfig usage/dependency/privatelib.c b/test cases/unit/27 pkgconfig usage/dependency/privatelib.c new file mode 100644 index 0000000..71d2179 --- /dev/null +++ b/test cases/unit/27 pkgconfig usage/dependency/privatelib.c @@ -0,0 +1,3 @@ +int internal_thingy() { + return 99; +} |