Merge branch '16-libraries-as-features' into 'master'

build: Add -Dui option to Meson

Closes #16

See merge request pwithnall/malcontent!38
This commit is contained in:
Philip Withnall 2020-03-24 11:09:56 +00:00
commit 5054ba2bfb
2 changed files with 26 additions and 3 deletions

View File

@ -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')

View File

@ -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'
)