build: Add an option to build against libmalcontent from the system

Rather than building it again; this is the second half of resolving the
dependency cycle from the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #16
This commit is contained in:
Philip Withnall 2020-03-05 22:02:43 +00:00
parent fda2fbd330
commit 6125cc3a85
2 changed files with 14 additions and 1 deletions

View file

@ -126,7 +126,14 @@ test_env = [
]
subdir('accounts-service')
subdir('libmalcontent')
if not get_option('use_system_libmalcontent')
subdir('libmalcontent')
else
libmalcontent_api_version = '0'
libmalcontent_dep = dependency('malcontent-' + libmalcontent_api_version, version: meson.project_version())
libmalcontent_gir = ['Malcontent-' + libmalcontent_api_version,
'Malcontent-' + libmalcontent_api_version + '.typelib']
endif
if get_option('ui').enabled()
subdir('libmalcontent-ui')
endif