aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-10-01 17:53:36 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-10-02 12:07:05 +0300
commit193a1bb253157b4ce97e185923f642db1b00ba26 (patch)
tree51c048f06eb4ae4082a258dda9b4db8bf2a3beb6 /meson.build
parent1042acff87ed7eabfbde367628458dcda4bb874d (diff)
downloadapk-tools-193a1bb253157b4ce97e185923f642db1b00ba26.tar.gz
apk-tools-193a1bb253157b4ce97e185923f642db1b00ba26.tar.bz2
apk-tools-193a1bb253157b4ce97e185923f642db1b00ba26.tar.xz
build: add option to build apk.static binary
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build15
1 files changed, 10 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 4aaf5c5..c2fa337 100644
--- a/meson.build
+++ b/meson.build
@@ -10,19 +10,24 @@ pkgc = import('pkgconfig')
apk_confdir = get_option('sysconfdir') / 'apk'
apk_libdir = get_option('libdir')
-zlib_dep = dependency('zlib')
-openssl_dep = dependency('openssl')
lua_bin = find_program('lua' + get_option('lua_version'), required: get_option('help'))
lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lua'))
scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
+shared_deps = [
+ dependency('zlib'),
+ dependency('openssl'),
+]
+
+static_deps = [
+ dependency('openssl', static: true),
+ dependency('zlib', static: true),
+]
+
add_project_arguments('-D_GNU_SOURCE', language: 'c')
# If we're a subproject we only want the static lib and not files
subproject = meson.is_subproject()
-if get_option('default_library') == 'static'
- add_project_arguments('-DOPENSSL_NO_ENGINE', language: 'c')
-endif
subdir('doc')
subdir('libfetch')