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
Signed-off-by: Ayoub Zaki <[email protected]>
  • Loading branch information
embetrix committed Jan 22, 2025
1 parent 2ef2402 commit 20c7938
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@ if host_machine.endian() == 'big'
endif

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

if default_pkcs11_module == ''
error('default_pkcs11_module is empty')
endif

conf.set_quoted('DEFAULT_PKCS11_MODULE', default_pkcs11_module)

headers = [
'dlfcn.h',
]
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ option('enable_explicit_EC_test',
type: 'boolean',
value: false,
description: 'Enable explicit EC tests')

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

0 comments on commit 20c7938

Please sign in to comment.