mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2025-12-20 04:20:04 +01:00
meson: Enable/disable polkit through an option
The user can enable and disable polkit using -Dpolkit.
This commit is contained in:
parent
bfde9fefb7
commit
b604a297be
2 changed files with 6 additions and 1 deletions
|
|
@ -47,7 +47,8 @@ gio_dep = dependency('gio-2.0', version: '>=' + glib_min_version)
|
|||
gio_unix_dep = dependency('gio-unix-2.0', version: '>=' + glib_min_version)
|
||||
m_dep = cc.find_library('m', required: true)
|
||||
|
||||
polkit = dependency('polkit-gobject-1', version: '>= 0.103')
|
||||
polkit = dependency('polkit-gobject-1', version: '>= 0.103',
|
||||
required: get_option('polkit').disable_auto_if(host_machine.system() != 'linux'))
|
||||
if polkit.found()
|
||||
cdata.set('HAVE_POLKIT', '1')
|
||||
if polkit.version().version_compare('>= 0.114')
|
||||
|
|
|
|||
|
|
@ -36,3 +36,7 @@ option('idevice',
|
|||
type : 'feature',
|
||||
value : 'auto',
|
||||
description : 'Build with libimobiledevice')
|
||||
option('polkit',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'PolKit support in daemon')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue