aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build63
1 files changed, 63 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 000000000..c77833905
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,63 @@
1## EXPERIMENTAL --- WORK IN PROGRESS --- USE AT YOUR OWN PERIL --- ##
2project('gnunet', 'c', license: 'AGPLv3', version: '0.21.0')
3compiler = meson.get_compiler('c')
4incdir = include_directories('src/include')
5cdata = configuration_data()
6
7# TODO: Set to true to build a single libgnunet
8gnunet_monolith = false
9
10message('Building on ' + host_machine.system())
11
12# TODO:
13# - Go through configure.ac and convert all defines/detections
14# - Compile all libs into a single libgnunet
15
16# FIXME lots still missing
17cdata.set_quoted('PACKAGE_VERSION', '0.21.0')
18cdata.set_quoted('GNUNET_DEFAULT_INTERFACE', 'en0')
19cdata.set_quoted('VCS_VERSION', 'mesonbuild')
20add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
21
22
23# FIXME: Not all dependencies here yet
24ltdl_dep = compiler.find_library('ltdl', required : true)
25unistr_dep = compiler.find_library('unistring', required : true)
26sqlite_dep = compiler.find_library('sqlite3', required : true)
27curl_dep = dependency('libcurl')
28zlib_dep = dependency('zlib')
29mhd_dep = dependency('libmicrohttpd')
30json_dep = compiler.find_library('jansson', required : true)
31gnunetdeps = [mhd_dep,
32 dependency('libgcrypt'),
33 dependency('libsodium'),
34 curl_dep,
35 json_dep,
36 zlib_dep,
37 unistr_dep, #dependency('libunistring'),
38 ltdl_dep, #dependency('ltdl'),
39 dependency('libidn2')]
40
41add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language : 'c')
42
43if compiler.has_header('sys/time.h')
44 add_project_arguments('-DHAVE_SYS_TIME_H', language : 'c')
45endif
46
47if compiler.has_header('idn2.h')
48 add_project_arguments('-DHAVE_LIBIDN2', language : 'c')
49 add_project_arguments('-DHAVE_IDN2_H', language : 'c')
50endif
51
52
53if compiler.has_function('strnlen', prefix : '#include <string.h>')
54 # function exists, do whatever is required.
55 add_project_arguments('-DHAVE_STRNLEN', language : 'c')
56endif
57
58configure_file(#input: 'gnunet_private_config.h.in',
59 output : 'gnunet_private_config.h',
60 configuration : cdata)
61configuration_inc = include_directories('.')
62
63subdir('src')