diff options
author | Simon McVittie <smcv@debian.org> | 2020-10-01 10:07:28 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2020-10-01 10:36:33 +0100 |
commit | afd155430075cee5380334a9c263cc28426fc79c (patch) | |
tree | 11c59a71af08872bc9f3de73bc880d06d387e1cb /meson.build | |
parent | 66170163c605dd86a7898634208a13d4e17d95f6 (diff) | |
download | epiphany-afd155430075cee5380334a9c263cc28426fc79c.tar.gz |
build: Allow libportal support to be disabledwip/smcv/libportal-optional
It isn't clear whether the API/ABI of libportal are entirely stable yet
(https://github.com/flatpak/libportal/issues/33) so it is not necessarily
appropriate for longer-term-supported OS distributions to include it.
When building a version of epiphany for a distribution package, which is
only intended to be packaged in a format other than as a Flatpak app,
libportal isn't necessary anyway.
libportal is also Linux-specific, so non-Linux OSs will likely want to
disable it (even if it might compile successfully).
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/meson.build b/meson.build index 9160738bd..4dcd7ad5b 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('epiphany', 'c', license: 'GPL3+', version: '40.alpha', - meson_version: '>= 0.46.0', + meson_version: '>= 0.47.0', default_options: ['c_std=gnu11', 'warning_level=2'] ) @@ -74,16 +74,6 @@ if gsb_api_key != '' endif conf.set10('ENABLE_GSB', get_option('enable_gsb')) -config_h = declare_dependency( - sources: vcs_tag( - input: configure_file( - output: 'config.h.in', - configuration: conf - ), - output: 'config.h' - ) -) - glib_requirement = '>= 2.61.2' gtk_requirement = '>= 3.24.0' nettle_requirement = '>= 3.4' @@ -108,11 +98,23 @@ libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0') libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0') libxml_dep = dependency('libxml-2.0', version: '>= 2.6.12') nettle_dep = dependency('nettle', version: nettle_requirement) -portal_dep = dependency('libportal', version: '>= 0.0.2') +portal_dep = dependency('libportal', version: '>= 0.0.2', required: get_option('libportal')) sqlite3_dep = dependency('sqlite3', version: '>= 3.22') webkit2gtk_dep = dependency('webkit2gtk-4.0', version: webkitgtk_requirement) webkit2gtk_web_extension_dep = dependency('webkit2gtk-web-extension-4.0', version: webkitgtk_requirement) +conf.set10('USE_LIBPORTAL', portal_dep.found()) + +config_h = declare_dependency( + sources: vcs_tag( + input: configure_file( + output: 'config.h.in', + configuration: conf + ), + output: 'config.h' + ) +) + cc = meson.get_compiler('c') gmp_dep = cc.find_library('gmp') m_dep = cc.find_library('m', required: false) |