From 022fab6736f6d2b57947a8175eddb79bfdb2779e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 28 Jan 2019 19:58:04 +0100 Subject: Successfully compile libsylph --- meson.build | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file 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) + -- cgit v1.2.3