build: Switch over to use libhandy-1

Add as a optional submodule for people who don't have it installed yet.
This commit is contained in:
Michael Gratton 2020-08-16 16:19:14 +10:00 committed by Michael James Gratton
parent 62ccfdafcd
commit 2d12b25e2c
6 changed files with 33 additions and 7 deletions

View file

@ -85,7 +85,7 @@ gthread = dependency('gthread-2.0', version: '>=' + target_glib)
iso_codes = dependency('iso-codes')
javascriptcoregtk = dependency('javascriptcoregtk-4.0', version: '>=' + target_webkit)
json_glib = dependency('json-glib-1.0', version: '>= 1.0')
libhandy = dependency('libhandy-0.0', version: '>= 0.0.10')
libhandy = dependency('libhandy-1', version: '>= 0.90', required: false)
libmath = cc.find_library('m')
libpeas = dependency('libpeas-1.0', version: '>= 1.24.0')
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.24.0')
@ -117,6 +117,24 @@ if libunwind_dep.found()
)
endif
# Handy 1.0 is still rather new
if not libhandy.found()
libhandy_project = subproject(
'libhandy',
default_options: [
'examples=false',
'package_subdir=geary',
'tests=false',
]
)
libhandy = declare_dependency(
dependencies: [
libhandy_project.get_variable('libhandy_dep'),
libhandy_project.get_variable('libhandy_vapi'),
]
)
endif
# Optional dependencies
appstream_util = find_program('appstream-util', required: false)
desktop_file_validate = find_program('desktop-file-validate', required: false)