Skip to content

Commit

Permalink
meson: add option to allow override default default_pkcs11_module
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Jan 22, 2025
1 parent 93bd41c commit 8dab31d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@ if host_machine.endian() == 'big'
endif

p11_kit = dependency('p11-kit-1', required: false)
if p11_kit.found()
default_pkcs11_module = p11_kit.get_variable(pkgconfig: 'proxy_module')
conf.set_quoted('DEFAULT_PKCS11_MODULE', default_pkcs11_module)
default_pkcs11_module = get_option('default_pkcs11_module')
if default_pkcs11_module == 'no'
if p11_kit.found()
default_pkcs11_module = p11_kit.get_variable(pkgconfig: 'proxy_module')
else
error('default_pkcs11_module is empty')
endif
endif
conf.set_quoted('DEFAULT_PKCS11_MODULE', default_pkcs11_module)

headers = [
'dlfcn.h',
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ option('preload_libasan',
type: 'string',
value: 'no',
description: 'Path to libasan.so to preload')


option('default_pkcs11_module',
type : 'string',
value : 'no',
description : 'Path to the default PKCS11 module')

0 comments on commit 8dab31d

Please sign in to comment.