mirror of
https://github.com/kmod-project/kmod.git
synced 2026-01-26 07:37:54 +00:00
meson: Let openssl option follow same logic as compression
Keep the logic similar for all libraries. While at it, add a comment divider for the config output. Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/262
This commit is contained in:
parent
be6302145c
commit
8d39823eeb
20
meson.build
20
meson.build
@ -316,14 +316,22 @@ endforeach
|
|||||||
# Signed modules
|
# Signed modules
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
crypto = dependency('libcrypto', version : '>= 1.1.0', required : get_option('openssl'))
|
opt = 'openssl'
|
||||||
if crypto.found()
|
dep = dependency('libcrypto', version : '>= 1.1.0', required : get_option(opt))
|
||||||
|
have = dep.found()
|
||||||
|
|
||||||
|
if have
|
||||||
module_signatures = 'PKCS7 legacy'
|
module_signatures = 'PKCS7 legacy'
|
||||||
else
|
else
|
||||||
module_signatures = 'legacy'
|
module_signatures = 'legacy'
|
||||||
endif
|
endif
|
||||||
cdata.set10('ENABLE_OPENSSL', crypto.found())
|
cdata.set10('ENABLE_' + opt.to_upper(), have)
|
||||||
features += ['@0@LIBCRYPTO'.format(crypto.found() ? '+' : '-')]
|
features += ['@0@@1@'.format(have ? '+' : '-', opt.to_upper())]
|
||||||
|
dep_map += {opt : dep}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Config output
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
cdata.set_quoted('KMOD_FEATURES', ' '.join(features))
|
cdata.set_quoted('KMOD_FEATURES', ' '.join(features))
|
||||||
|
|
||||||
@ -389,8 +397,8 @@ if dep_map.get('zlib').found()
|
|||||||
libkmod_deps += dep_map['zlib']
|
libkmod_deps += dep_map['zlib']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if crypto.found()
|
if dep_map.get('openssl').found()
|
||||||
libkmod_deps += crypto
|
libkmod_deps += dep_map['openssl']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_headers('libkmod/libkmod.h')
|
install_headers('libkmod/libkmod.h')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user