2019-09-28 00:26:23 +10:00
|
|
|
# Build source configuration
|
|
|
|
|
config_h_dir = include_directories('.')
|
|
|
|
|
|
|
|
|
|
conf = configuration_data()
|
|
|
|
|
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
|
|
|
|
conf.set_quoted('G_LOG_DOMAIN', meson.project_name())
|
|
|
|
|
conf.set_quoted('_APP_ID', geary_id)
|
2022-03-18 12:18:45 +01:00
|
|
|
conf.set_quoted('_BUILD_ROOT_DIR', meson.project_build_root())
|
|
|
|
|
conf.set_quoted('_GSETTINGS_DIR', meson.project_build_root() / 'desktop')
|
2019-09-28 00:26:23 +10:00
|
|
|
conf.set_quoted('_INSTALL_PREFIX', geary_prefix)
|
|
|
|
|
conf.set_quoted('_ISO_CODE_3166_XML', iso_3166_xml)
|
|
|
|
|
conf.set_quoted('_ISO_CODE_639_XML', iso_639_xml)
|
|
|
|
|
conf.set_quoted('_LANGUAGE_SUPPORT_DIRECTORY', locale_dir)
|
|
|
|
|
conf.set_quoted('_NAME_SUFFIX', name_suffix)
|
|
|
|
|
conf.set_quoted('_PLUGINS_DIR', plugins_dir)
|
|
|
|
|
conf.set_quoted('_PROFILE', profile)
|
|
|
|
|
conf.set_quoted('_REVNO', revno)
|
2022-03-18 12:18:45 +01:00
|
|
|
conf.set_quoted('_SOURCE_ROOT_DIR', meson.project_source_root())
|
2019-09-28 00:26:23 +10:00
|
|
|
conf.set_quoted('_VERSION', geary_version)
|
|
|
|
|
conf.set_quoted('_WEB_EXTENSIONS_DIR', web_extensions_dir)
|
|
|
|
|
configure_file(output: 'config.h', configuration: conf)
|
|
|
|
|
|
|
|
|
|
# Common valac options
|
2019-09-27 23:56:52 +10:00
|
|
|
geary_vala_args = [
|
2020-03-07 18:04:38 +11:00
|
|
|
'--abi-stability',
|
2017-12-09 00:45:29 +01:00
|
|
|
'--enable-checking',
|
|
|
|
|
]
|
|
|
|
|
|
2017-12-14 09:44:19 +11:00
|
|
|
# Symbols for valac's preprocessor must be defined as compiler args,
|
|
|
|
|
# not in the code or in config.h
|
2021-04-21 09:11:13 +10:00
|
|
|
vala_defines = []
|
|
|
|
|
|
2020-10-03 21:06:43 +10:00
|
|
|
if get_option('ref_tracking').enabled()
|
2021-04-21 09:11:13 +10:00
|
|
|
vala_defines += [ '--define=REF_TRACKING' ]
|
2017-12-14 09:34:00 +11:00
|
|
|
endif
|
|
|
|
|
|
2021-04-21 09:11:59 +10:00
|
|
|
if gmime.version().version_compare('<=3.2.7')
|
|
|
|
|
vala_defines += [ '--define=GMIME_STREAM_WRITE_STRING' ]
|
|
|
|
|
endif
|
|
|
|
|
|
2021-04-21 09:11:13 +10:00
|
|
|
geary_vala_args += vala_defines
|
|
|
|
|
|
2019-09-28 00:26:23 +10:00
|
|
|
# Common cc options
|
2019-09-27 23:56:52 +10:00
|
|
|
geary_c_args = [
|
2017-12-09 00:45:29 +01:00
|
|
|
'-include', 'config.h',
|
2018-12-29 12:57:01 +11:00
|
|
|
# Enable GLib structured logging
|
|
|
|
|
'-DG_LOG_USE_STRUCTURED',
|
2018-01-12 16:05:49 +11:00
|
|
|
# Select libunwind's optimised, local-only backtrace unwiding. See
|
|
|
|
|
# libunwind(3).
|
|
|
|
|
'-DUNW_LOCAL_ONLY',
|
2019-04-05 23:32:21 +11:00
|
|
|
# None of these kids want to hang out unless you are cool enough
|
2019-01-10 17:33:37 +11:00
|
|
|
'-DGCK_API_SUBJECT_TO_CHANGE',
|
2019-09-28 00:26:23 +10:00
|
|
|
'-DGCR_API_SUBJECT_TO_CHANGE',
|
2019-04-05 23:32:21 +11:00
|
|
|
'-DGOA_API_IS_SUBJECT_TO_CHANGE',
|
2017-12-09 00:45:29 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
subdir('engine')
|
|
|
|
|
subdir('client')
|
|
|
|
|
subdir('console')
|
|
|
|
|
subdir('mailer')
|
|
|
|
|
|
2020-08-10 16:53:39 +10:00
|
|
|
web_process_sources = files(
|
2019-07-21 10:00:32 +10:00
|
|
|
'client/web-process/web-process-extension.vala',
|
|
|
|
|
'client/util/util-js.vala',
|
|
|
|
|
)
|
|
|
|
|
|
2017-12-09 00:45:29 +01:00
|
|
|
# Web process extension library
|
2020-08-10 16:53:39 +10:00
|
|
|
web_process = library('geary-web-process',
|
|
|
|
|
web_process_sources,
|
2017-12-09 00:45:29 +01:00
|
|
|
dependencies: [
|
2020-08-10 16:53:39 +10:00
|
|
|
engine_dep,
|
2017-12-09 00:45:29 +01:00
|
|
|
gee,
|
|
|
|
|
gmime,
|
2019-07-21 10:00:32 +10:00
|
|
|
webkit2gtk_web_extension,
|
2017-12-09 00:45:29 +01:00
|
|
|
],
|
2019-09-28 00:26:23 +10:00
|
|
|
include_directories: config_h_dir,
|
2020-09-28 08:53:35 +10:00
|
|
|
vala_args: geary_vala_args,
|
2019-09-28 00:26:23 +10:00
|
|
|
c_args: geary_c_args,
|
2017-12-09 00:45:29 +01:00
|
|
|
install: true,
|
2019-01-17 11:08:26 +11:00
|
|
|
install_dir: web_extensions_dir
|
2017-12-09 00:45:29 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Now finally, make the geary executable
|
2020-08-10 16:53:39 +10:00
|
|
|
bin_sources = files(
|
2020-03-30 19:24:57 +11:00
|
|
|
'client' / 'application' / 'main.vala',
|
2017-12-09 00:45:29 +01:00
|
|
|
)
|
|
|
|
|
|
2020-08-10 16:53:39 +10:00
|
|
|
bin_sources += [
|
2017-12-13 15:07:11 +11:00
|
|
|
geary_compiled_schema,
|
|
|
|
|
geary_resources # Included here so they show up in the executable.
|
|
|
|
|
]
|
2020-08-10 16:53:39 +10:00
|
|
|
bin_dependencies = [
|
2019-02-26 22:54:28 +11:00
|
|
|
folks,
|
2017-12-09 00:45:29 +01:00
|
|
|
gdk,
|
2020-08-10 16:53:39 +10:00
|
|
|
client_dep,
|
|
|
|
|
engine_dep,
|
2017-12-13 15:07:11 +11:00
|
|
|
gee,
|
|
|
|
|
gmime,
|
2018-05-23 17:46:48 +10:00
|
|
|
goa,
|
2017-12-13 15:07:11 +11:00
|
|
|
gtk,
|
2019-07-21 10:00:32 +10:00
|
|
|
javascriptcoregtk,
|
2019-07-04 13:30:42 +10:00
|
|
|
libhandy,
|
2017-12-13 15:07:11 +11:00
|
|
|
libmath,
|
2019-09-27 02:51:05 +10:00
|
|
|
libpeas,
|
2017-12-13 15:07:11 +11:00
|
|
|
webkit2gtk,
|
2017-12-09 00:45:29 +01:00
|
|
|
]
|
|
|
|
|
|
2020-08-10 16:53:39 +10:00
|
|
|
bin = executable('geary',
|
|
|
|
|
bin_sources,
|
|
|
|
|
dependencies: bin_dependencies,
|
2019-09-27 23:56:52 +10:00
|
|
|
vala_args: geary_vala_args,
|
|
|
|
|
c_args: geary_c_args,
|
2017-12-09 00:45:29 +01:00
|
|
|
install: true,
|
2020-03-30 11:01:03 +11:00
|
|
|
install_rpath: client_lib_dir,
|
2017-12-09 00:45:29 +01:00
|
|
|
)
|
|
|
|
|
|
2020-04-08 11:59:44 +10:00
|
|
|
valadoc_dependencies = [
|
|
|
|
|
cairo,
|
|
|
|
|
enchant,
|
|
|
|
|
folks,
|
|
|
|
|
gcr,
|
|
|
|
|
gdk,
|
|
|
|
|
gee,
|
|
|
|
|
gio,
|
|
|
|
|
glib,
|
|
|
|
|
gmime,
|
|
|
|
|
goa,
|
|
|
|
|
gspell,
|
|
|
|
|
gtk,
|
|
|
|
|
javascriptcoregtk,
|
|
|
|
|
json_glib,
|
|
|
|
|
libhandy,
|
|
|
|
|
libpeas,
|
|
|
|
|
libsecret,
|
|
|
|
|
libxml,
|
|
|
|
|
sqlite,
|
|
|
|
|
webkit2gtk
|
|
|
|
|
]
|
|
|
|
|
|
2020-08-27 08:30:15 +10:00
|
|
|
valadoc_vapi_dirs = [
|
|
|
|
|
vapi_dir,
|
|
|
|
|
meson.current_build_dir()
|
|
|
|
|
]
|
2021-04-13 19:08:39 +10:00
|
|
|
if libhandy_vapi != ''
|
|
|
|
|
valadoc_vapi_dirs += libhandy_vapi
|
|
|
|
|
endif
|
2020-08-27 08:30:15 +10:00
|
|
|
|
2020-04-08 11:59:44 +10:00
|
|
|
# Hopefully Meson will get baked-in valadoc support, so we don't have
|
2020-08-16 17:19:03 +10:00
|
|
|
# to resort to these kinds of hacks any more. See
|
|
|
|
|
# https://github.com/mesonbuild/meson/issues/894
|
|
|
|
|
|
2020-04-08 11:59:44 +10:00
|
|
|
valadoc_dep_args = []
|
|
|
|
|
foreach dep : valadoc_dependencies
|
|
|
|
|
valadoc_dep_args += '--pkg'
|
2021-04-13 19:08:39 +10:00
|
|
|
if dep != libhandy
|
|
|
|
|
valadoc_dep_args += dep.name()
|
|
|
|
|
else
|
|
|
|
|
valadoc_dep_args += 'libhandy-1'
|
|
|
|
|
endif
|
2020-04-08 11:59:44 +10:00
|
|
|
endforeach
|
2021-01-18 22:16:24 +11:00
|
|
|
valadoc_dep_args += [ '--pkg', 'icu-uc' ]
|
2020-09-13 16:27:51 +10:00
|
|
|
valadoc_dep_args += [ '--pkg', 'libstemmer' ]
|
2020-04-08 11:59:44 +10:00
|
|
|
valadoc_dep_args += [ '--pkg', 'posix' ]
|
|
|
|
|
|
2020-08-16 17:19:03 +10:00
|
|
|
valadoc_vapidir_args = []
|
|
|
|
|
foreach dir : valadoc_vapi_dirs
|
|
|
|
|
valadoc_vapidir_args += '--vapidir=@0@'.format(dir)
|
|
|
|
|
endforeach
|
|
|
|
|
|
2020-10-03 21:06:43 +10:00
|
|
|
if valadoc.found()
|
2020-08-10 16:53:39 +10:00
|
|
|
docs = custom_target('valadoc',
|
2017-12-09 00:45:29 +01:00
|
|
|
build_by_default: true,
|
2020-08-10 16:53:39 +10:00
|
|
|
depends: [client_lib, engine_lib],
|
|
|
|
|
input: client_vala_sources + engine_sources,
|
2018-01-09 18:28:29 +11:00
|
|
|
output: 'valadoc',
|
2017-12-09 00:45:29 +01:00
|
|
|
command: [ valadoc,
|
|
|
|
|
'--verbose',
|
|
|
|
|
'--force',
|
2018-01-09 18:28:29 +11:00
|
|
|
'--internal',
|
2019-09-27 23:51:19 +10:00
|
|
|
'--package-name=@0@'.format(meson.project_name()),
|
2017-12-09 00:45:29 +01:00
|
|
|
'--package-version=@0@'.format(meson.project_version()),
|
|
|
|
|
'-b', meson.current_source_dir(),
|
|
|
|
|
'-o', '@OUTPUT@',
|
2021-04-21 09:11:13 +10:00
|
|
|
] + vala_defines + valadoc_dep_args + valadoc_vapidir_args + [
|
2020-08-16 17:19:03 +10:00
|
|
|
'@INPUT@'
|
|
|
|
|
]
|
2017-12-09 00:45:29 +01:00
|
|
|
)
|
|
|
|
|
endif
|