summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-04-16 23:32:02 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-10-09 16:09:19 +0300
commitfe1de720d02ae91856ec966801f69b1f1a8e3168 (patch)
treeb6acb1123ab776c296351be8fd52b445a0c65e31 /meson.build
parentefe0c4afecb9fd3da2ab4849d2b8edd5bea14d08 (diff)
downloadapk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.gz
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.bz2
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.tar.xz
apk-tools-fe1de720d02ae91856ec966801f69b1f1a8e3168.zip
build: add support for building with meson
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build31
1 files changed, 31 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..c3fd394
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,31 @@
+project(
+ 'apk-tools',
+ ['c'],
+ default_options : ['c_std=gnu99'],
+ version: '2.10.5',
+ meson_version: '>=0.51'
+)
+pkgc = import('pkgconfig')
+
+apk_confdir = get_option('sysconfdir') / 'apk'
+apk_libdir = get_option('libdir')
+
+zlib_dep = dependency('zlib')
+openssl_dep = dependency('openssl')
+lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lua'))
+scdoc = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
+
+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('libfetch')
+subdir('src')
+
+if scdoc.found()
+ subdir('doc')
+endif