[pacman-dev] [PATCH] meson: fix static/shared split again
Allan McRae
allan at archlinux.org
Thu Feb 21 04:36:47 UTC 2019
On 14/2/19 4:10 am, Eli Schwartz wrote:
> shared_library does not generate a sane pkg-config file because it
> assumes we don't want dependencies.
>
> Additionally, since we key off of buildstatic, when *not* using
> buildstatic but attempting to build libalpm on its own as static using
> -Ddefault_library=static, we are building and linking to a shared
> libalpm anyway.
>
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---
> meson.build | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Not a meson expert (#autotools4life), and there seems to be not further
comments, so I'm pulling the patch and assuming this has been tested and
achieves the desired result...
> diff --git a/meson.build b/meson.build
> index 8e9dbd71..0f706c64 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -363,8 +363,8 @@ libalpm_a = static_library(
> link_with : [libcommon],
> install : true)
>
> -if not get_option('buildstatic')
> - libalpm = shared_library(
> +if get_option('default_library') != 'static'
> + libalpm = library(
> 'alpm',
> version : libalpm_version,
> link_whole: [libalpm_a],
>
More information about the pacman-dev
mailing list