aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-28 19:58:04 +0100
committerThomas White <taw@physics.org>2019-05-16 15:15:49 +0200
commit022fab6736f6d2b57947a8175eddb79bfdb2779e (patch)
treeede6bb78d5553c14c5d69d70c19f810d56078365
parent7820eaabef3b2ef52435e94ff0d6ead31eb92b96 (diff)
Successfully compile libsylph
-rw-r--r--meson.build45
1 files changed, 42 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 6e77f290..523a68d2 100644
--- a/meson.build
+++ b/meson.build
@@ -3,10 +3,48 @@ project('sylpheed', 'c',
license : ['GPL2+', 'LGPL2+'],
default_options : ['buildtype=debugoptimized'])
+compiler = meson.get_compiler('c')
-glibdep = dependency('glib-2.0')
+glib = dependency('glib-2.0')
+gobject = dependency('gobject-2.0')
+openssl = dependency('openssl', required : false)
-library('libsylph',
+add_project_arguments('-Wno-deprecated-declarations', language : 'c')
+add_project_arguments('-Wno-unused-but-set-variable', language : 'c')
+add_project_arguments('-Wno-format', language : 'c')
+
+conf_data = configuration_data()
+
+add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
+
+add_project_arguments('-DUSE_THREADS', language : 'c')
+
+if openssl.found()
+ add_project_arguments('-DUSE_SSL', language : 'c')
+endif
+
+
+conf_data.set('ICONV_CONST', '')
+
+add_project_arguments('-DSYSCONFDIR="'+get_option('sysconfdir')+'"',
+ language : 'c')
+
+if compiler.has_header('sys/wait.h')
+ conf_data.set('HAVE_SYS_WAIT_H', 1)
+endif
+
+if compiler.has_header('sys/select.h')
+ conf_data.set('HAVE_SYS_SELECT_H', 1)
+endif
+
+if compiler.has_header('netdb.h')
+ conf_data.set('HAVE_NETDB_H', 1)
+endif
+
+configure_file(output : 'config.h',
+ configuration : conf_data)
+
+library('sylph',
['libsylph/account.c',
'libsylph/base64.c',
'libsylph/codeconv.c',
@@ -45,5 +83,6 @@ library('libsylph',
'libsylph/uuencode.c',
'libsylph/virtual.c',
'libsylph/xml.c'],
- dependencies : [glibdep],
+ dependencies : [glib, gobject, openssl],
install : true)
+