diff --git a/meson.build b/meson.build index 8ef161a..9b2d44b 100644 --- a/meson.build +++ b/meson.build @@ -126,10 +126,21 @@ test_env = [ ] subdir('accounts-service') -subdir('libmalcontent') -subdir('libmalcontent-ui') +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 subdir('malcontent-client') -subdir('malcontent-control') +if get_option('ui').enabled() + subdir('malcontent-control') +endif subdir('pam') subdir('po') diff --git a/meson_options.txt b/meson_options.txt index 06329d4..d516c70 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,3 +9,15 @@ option( type: 'string', description: 'directory for PAM modules' ) +option( + 'ui', + type: 'feature', + value: 'enabled', + description: 'enable UI library' +) +option( + 'use_system_libmalcontent', + type: 'boolean', + value: false, + description: 'use installed libmalcontent rather than building it; used in distros to break a dependency cycle' +)