summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build15
1 files changed, 12 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 02a3a3d3..8e9dbd71 100644
--- a/meson.build
+++ b/meson.build
@@ -355,15 +355,24 @@ libcommon = static_library(
include_directories : includes,
install : false)
-libalpm = library(
+libalpm_a = static_library(
'alpm',
libalpm_sources,
- version : libalpm_version,
include_directories : includes,
dependencies : [crypto_provider, libarchive, libcurl] + gpgme_libs,
link_with : [libcommon],
install : true)
+if not get_option('buildstatic')
+ libalpm = shared_library(
+ 'alpm',
+ version : libalpm_version,
+ link_whole: [libalpm_a],
+ install : true)
+else
+ libalpm = libalpm_a
+endif
+
install_headers(
'lib/libalpm/alpm.h',
'lib/libalpm/alpm_list.h')
@@ -414,7 +423,7 @@ executable(
'vercmp',
vercmp_sources,
include_directories : includes,
- link_with : [libalpm],
+ link_with : [libalpm_a],
install : true,
)