# Meson file for Sylpheed project('sylpheed', 'c', version : '3.7.0', license : ['GPL2+', 'LGPL2+'], default_options : ['buildtype=debugoptimized']) # 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="'+join_paths(get_option('prefix'), get_option('sysconfdir'))+'"', language : 'c') add_project_arguments('-DMANUALDIR="'+join_paths(get_option('prefix'), get_option('datadir'), 'sylpheed', 'manual')+'"', language : 'c') add_project_arguments('-DFAQDIR="'+join_paths(get_option('prefix'), get_option('datadir'), 'sylpheed', 'faq')+'"', language : 'c') add_project_arguments('-DTHEMEDIR="'+join_paths(get_option('prefix'), get_option('datadir'), 'sylpheed', 'icons')+'"', language : 'c') add_project_arguments('-DPLUGINDIR="'+join_paths(get_option('prefix'), get_option('libdir'), 'sylpheed', 'plugins')+'"', language : 'c') add_project_arguments('-DTARGET_ALIAS="xxxx"', language : 'c') if openssl.found() add_project_arguments('-DUSE_SSL', language : 'c') endif 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) # 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') bison = find_program('bison') quote_fmt_parse_c = custom_target('quote_fmt_parse.tab.c', output : ['quote_fmt_parse.tab.c', 'quote_fmt_parse.tab.h'], input : 'src/quote_fmt_parse.y', command : [bison, '--defines=@OUTPUT1@', '-p', 'quote_fmt', '--output=@OUTPUT0@', '@INPUT@']) quote_fmt_c = custom_target('quote_fmt.c', output : ['quote_fmt.c', 'quote_fmt.h'], input : 'src/quote_fmt_lex.l', depends : quote_fmt_parse_c, command : [flex, '--outfile=@OUTPUT0@', '--header-file=@OUTPUT1@', '-P', 'quote_fmt', '@INPUT@']) executable('sylpheed', ['src/about.c', 'src/account_dialog.c', 'src/action.c', 'src/addrbook.c', 'src/addrcache.c', 'src/addr_compl.c', 'src/addressadd.c', 'src/addressbook.c', 'src/addrindex.c', 'src/addritem.c', 'src/alertpanel.c', 'src/colorlabel.c', 'src/compose.c', 'src/editaddress.c', 'src/editbook.c', 'src/editgroup.c', 'src/editjpilot.c', 'src/editldap_basedn.c', 'src/editldap.c', 'src/editvcard.c', 'src/eggtrayicon.c', 'src/export.c', 'src/exportcsv.c', 'src/filesel.c', 'src/foldersel.c', 'src/folderview.c', 'src/gtkshruler.c', 'src/gtkutils.c', 'src/headerview.c', 'src/imageview.c', 'src/import.c', 'src/importcsv.c', 'src/importldif.c', 'src/inc.c', 'src/inputdialog.c', 'src/jpilot.c', 'src/ldif.c', 'src/logwindow.c', 'src/main.c', 'src/mainwindow.c', 'src/manage_window.c', 'src/manual.c', 'src/menu.c', 'src/message_search.c', 'src/messageview.c', 'src/mgutils.c', 'src/mimeview.c', 'src/notificationwindow.c', 'src/passphrase.c', 'src/plugin.c', 'src/plugin_manager.c', 'src/prefs_account_dialog.c', 'src/prefs_actions.c', 'src/prefs_common_dialog.c', 'src/prefs_customheader.c', 'src/prefs_display_header.c', 'src/prefs_display_items.c', 'src/prefs_filter.c', 'src/prefs_filter_edit.c', 'src/prefs_folder_item.c', 'src/prefs_search_folder.c', 'src/prefs_summary_column.c', 'src/prefs_template.c', 'src/prefs_toolbar.c', 'src/prefs_ui.c', 'src/printing.c', 'src/progressdialog.c', quote_fmt_parse_c, quote_fmt_c, 'src/query_search.c', 'src/quick_search.c', 'src/rfc2015.c', 'src/rpop3.c', 'src/select-keys.c', 'src/send_message.c', 'src/setup.c', 'src/sigstatus.c', 'src/simple-gettext.c', 'src/sourcewindow.c', 'src/sslmanager.c', 'src/statusbar.c', 'src/stock_pixmap.c', 'src/subscribedialog.c', 'src/summaryview.c', 'src/syldap.c', 'src/template.c', 'src/textview.c', 'src/trayicon.c', 'src/undo.c', 'src/update_check.c', 'src/vcard.c'], dependencies : [gtk, glib, gobject, libsylph_dep], install : true)