meson: fix static/shared split again

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@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2019-02-13 13:10:27 -05:00 committed by Allan McRae
parent 3c774252ef
commit ba7a41031c

View file

@ -363,8 +363,8 @@ libalpm_a = static_library(
link_with : [libcommon], link_with : [libcommon],
install : true) install : true)
if not get_option('buildstatic') if get_option('default_library') != 'static'
libalpm = shared_library( libalpm = library(
'alpm', 'alpm',
version : libalpm_version, version : libalpm_version,
link_whole: [libalpm_a], link_whole: [libalpm_a],