From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- meson/test cases/unit/77 as link whole/bar.c | 6 ++++++ meson/test cases/unit/77 as link whole/foo.c | 6 ++++++ meson/test cases/unit/77 as link whole/meson.build | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 meson/test cases/unit/77 as link whole/bar.c create mode 100644 meson/test cases/unit/77 as link whole/foo.c create mode 100644 meson/test cases/unit/77 as link whole/meson.build (limited to 'meson/test cases/unit/77 as link whole') diff --git a/meson/test cases/unit/77 as link whole/bar.c b/meson/test cases/unit/77 as link whole/bar.c new file mode 100644 index 000000000..79dea9d0f --- /dev/null +++ b/meson/test cases/unit/77 as link whole/bar.c @@ -0,0 +1,6 @@ +int bar(void); + +int bar(void) +{ + return 0; +} diff --git a/meson/test cases/unit/77 as link whole/foo.c b/meson/test cases/unit/77 as link whole/foo.c new file mode 100644 index 000000000..ffeee82fe --- /dev/null +++ b/meson/test cases/unit/77 as link whole/foo.c @@ -0,0 +1,6 @@ +int foo(void); + +int foo(void) +{ + return 0; +} diff --git a/meson/test cases/unit/77 as link whole/meson.build b/meson/test cases/unit/77 as link whole/meson.build new file mode 100644 index 000000000..6bc208f1b --- /dev/null +++ b/meson/test cases/unit/77 as link whole/meson.build @@ -0,0 +1,11 @@ +project('as-link-whole', 'c') + +foo = static_library('foo', 'foo.c', install: true) +dep = declare_dependency(link_with: foo) +bar1 = library('bar1', 'bar.c', dependencies: dep) +bar2 = library('bar2', 'bar.c', dependencies: dep.as_link_whole()) + +# bar1.pc should have -lfoo but not bar2.pc +pkg = import('pkgconfig') +pkg.generate(bar1) +pkg.generate(bar2) -- cgit 1.2.3-korg