From 3f7c6cf3d6a204e9665faad3c05bb5049f08ac74 Mon Sep 17 00:00:00 2001 From: Martin Hostettler Date: Sun, 18 Feb 2018 17:55:19 +0100 Subject: Improve generation of pkg-config files for static only libraries. Previously pkg-config files generated by the pkgconfig modules for static libraries with dependencies could only be used in a dependencies with `static: true`. This was caused by the dependencies only appearing in Libs.private even if they are needed in the default linking mode. But a user of a dependency should not have to know if the default linking mode is static or dynamic; A dependency('somelib') call should always pull in all needed pieces into the build. Now for meson build static libraries passed via `libraries` to the generate method automatically promote dependencies to public. --- docs/markdown/snippets/pkg-config-fix-static-only.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/markdown/snippets/pkg-config-fix-static-only.md (limited to 'docs/markdown') diff --git a/docs/markdown/snippets/pkg-config-fix-static-only.md b/docs/markdown/snippets/pkg-config-fix-static-only.md new file mode 100644 index 0000000..31cd389 --- /dev/null +++ b/docs/markdown/snippets/pkg-config-fix-static-only.md @@ -0,0 +1,12 @@ +## Improved generation of pkg-config files for static only libraries. + +Previously pkg-config files generated by the pkgconfig modules for static libraries +with dependencies could only be used in a dependencies with `static: true`. + +Now the generated file contains the needed dependencies libraries directly within +`Requires` and `Libs` for build static libraries passed via the `libraries` keyword +argument. + +Projects that install both a static and a shared version of a library should use +the result of `both_libraries` to the pkg config file generator or use +configure_file for more complicated setups. -- cgit v1.1