From 658c8bd6f634ba1e0fb7e9aff6b10a845ffe8082 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 28 Jan 2019 23:07:49 +0100 Subject: Work on flex etc --- meson.build | 144 +++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 94 insertions(+), 50 deletions(-) diff --git a/meson.build b/meson.build index 512acaa0..d9d9349d 100644 --- a/meson.build +++ b/meson.build @@ -1,34 +1,41 @@ +# Meson file for Sylpheed + project('sylpheed', 'c', version : '3.7.0', license : ['GPL2+', 'LGPL2+'], default_options : ['buildtype=debugoptimized']) -compiler = meson.get_compiler('c') +# Dependency packages + +gtk = dependency('gtk+-2.0') glib = dependency('glib-2.0') gobject = dependency('gobject-2.0') openssl = dependency('openssl', required : false) + +# Suppress some compiler warnings (for now) + 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') + +# Configuration + +compiler = meson.get_compiler('c') conf_data = configuration_data() add_project_arguments('-DHAVE_CONFIG_H', language : 'c') - add_project_arguments('-DUSE_THREADS', language : 'c') +conf_data.set('ICONV_CONST', '') +add_project_arguments('-DSYSCONFDIR="'+get_option('sysconfdir')+'"', + 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 @@ -44,47 +51,83 @@ endif configure_file(output : 'config.h', configuration : conf_data) -library('sylph', - ['libsylph/account.c', - 'libsylph/base64.c', - 'libsylph/codeconv.c', - 'libsylph/customheader.c', - 'libsylph/displayheader.c', - 'libsylph/filter.c', - 'libsylph/folder.c', - 'libsylph/html.c', - 'libsylph/imap.c', - 'libsylph/mbox.c', - 'libsylph/md5.c', - 'libsylph/md5_hmac.c', - 'libsylph/mh.c', - 'libsylph/news.c', - 'libsylph/nntp.c', - 'libsylph/pop.c', - 'libsylph/prefs_account.c', - 'libsylph/prefs.c', - 'libsylph/prefs_common.c', - 'libsylph/procheader.c', - 'libsylph/procmime.c', - 'libsylph/procmsg.c', - 'libsylph/quoted-printable.c', - 'libsylph/recv.c', - 'libsylph/session.c', - 'libsylph/smtp.c', - 'libsylph/socket.c', - 'libsylph/socks.c', - 'libsylph/ssl.c', - 'libsylph/ssl_hostname_validation.c', - 'libsylph/stringtable.c', - 'libsylph/sylmain.c', - 'libsylph/syl-marshal.c', - 'libsylph/unmime.c', - 'libsylph/utils.c', - 'libsylph/uuencode.c', - 'libsylph/virtual.c', - 'libsylph/xml.c'], - dependencies : [glib, gobject, openssl], - install : true) + +# version.h file + +version_data = configuration_data() + +version_data.set('MAJOR_VERSION', '3') +version_data.set('MINOR_VERSION', '7') +version_data.set('MICRO_VERSION', '0') +version_data.set('EXTRA_VERSION', '') +version_data.set('BUILD_REVISION', '') +version_data.set('PACKAGE', 'sylpheed') +version_data.set('VERSION', '3.7.0') + +configure_file(input : 'src/version.h.in', + output : 'version.h', + configuration : version_data) + + +# Instructions for building libsylph + +libsylph_includes = include_directories('libsylph') + +libsylph = library('sylph', + ['libsylph/account.c', + 'libsylph/base64.c', + 'libsylph/codeconv.c', + 'libsylph/customheader.c', + 'libsylph/displayheader.c', + 'libsylph/filter.c', + 'libsylph/folder.c', + 'libsylph/html.c', + 'libsylph/imap.c', + 'libsylph/mbox.c', + 'libsylph/md5.c', + 'libsylph/md5_hmac.c', + 'libsylph/mh.c', + 'libsylph/news.c', + 'libsylph/nntp.c', + 'libsylph/pop.c', + 'libsylph/prefs_account.c', + 'libsylph/prefs.c', + 'libsylph/prefs_common.c', + 'libsylph/procheader.c', + 'libsylph/procmime.c', + 'libsylph/procmsg.c', + 'libsylph/quoted-printable.c', + 'libsylph/recv.c', + 'libsylph/session.c', + 'libsylph/smtp.c', + 'libsylph/socket.c', + 'libsylph/socks.c', + 'libsylph/ssl.c', + 'libsylph/ssl_hostname_validation.c', + 'libsylph/stringtable.c', + 'libsylph/sylmain.c', + 'libsylph/syl-marshal.c', + 'libsylph/unmime.c', + 'libsylph/utils.c', + 'libsylph/uuencode.c', + 'libsylph/virtual.c', + 'libsylph/xml.c'], + include_directories : libsylph_includes, + dependencies : [glib, gobject, openssl], + install : true) + +libsylph_dep = declare_dependency(include_directories : libsylph_includes, + link_with : libsylph) + + +# Instructions for building sylpheed executable + +flex = find_program('flex') + +quote_fmt_lex_c = custom_target('quote_fmt_lex', + output : 'quote_fmt_lex.c', + input : 'src/quote_fmt_lex.l', + command : [flex, '-o', '@OUTPUT@', '@INPUT@']) executable('sylpheed', ['src/about.c', @@ -154,6 +197,7 @@ executable('sylpheed', 'src/prefs_ui.c', 'src/printing.c', 'src/progressdialog.c', + quote_fmt_lex_c, 'src/query_search.c', 'src/quick_search.c', 'src/rfc2015.c', @@ -176,5 +220,5 @@ executable('sylpheed', 'src/undo.c', 'src/update_check.c', 'src/vcard.c'], - dependencies : [glib, gobject], + dependencies : [gtk, glib, gobject, libsylph_dep], install : true) -- cgit v1.2.3