aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-28 23:07:49 +0100
committerThomas White <taw@physics.org>2019-05-16 15:15:49 +0200
commit658c8bd6f634ba1e0fb7e9aff6b10a845ffe8082 (patch)
treec597c98ffce2f2ffb270cc00febdffc9ede727c1
parent8c3a3e3a8d1fd1a4c20b0bc3230f23051aa33ae2 (diff)
Work on flex etc
-rw-r--r--meson.build144
1 files 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)