Skip to content

Commit

Permalink
meson: add options to disable polkit and libsystemd
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 committed Aug 14, 2024
1 parent daf1d93 commit bde1526
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,18 @@ endif
cc = meson.get_compiler('c')
dl_deps = cc.find_library('dl', required: false)

polkit_dep = dependency('polkit-gobject-1', required : get_option('polkit'))
if polkit_dep.found()
pcscd_dep += dl_deps

if get_option('polkit')
polkit_dep = dependency('polkit-gobject-1')
pcscd_dep += polkit_dep
conf_data.set('HAVE_POLKIT', true)
features += 'polkit'
endif

systemd_dep = dependency('libsystemd', required : get_option('libsystemd'))
if systemd_dep.found()
if get_option('libsystemd')
systemd_dep = dependency('libsystemd')
pcscd_dep += systemd_dep
conf_data.set('USE_LIBSYSTEMD', true)
features += 'systemd'
endif
Expand All @@ -139,8 +143,6 @@ if pcsc_arch == 'Darwin'
endif
conf_data.set_quoted('PCSC_ARCH', pcsc_arch)

pcscd_dep += [polkit_dep, systemd_dep, dl_deps]

features += pcsc_arch
features += target_machine.cpu()
features += 'ipcdir=' + get_option('ipcdir')
Expand Down

0 comments on commit bde1526

Please sign in to comment.