Use pkg-config to detect libpcsclite.

Test the presence of libpcsclite, libpkcs11-helper-1, opensc-pkcs11
and libcryptsetup only if the tdehw library is built.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/196/head
Slávek Banko 2 years ago
parent 89f3dfb35e
commit c2271960d1
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -756,7 +756,9 @@ endif( WITH_LZMA )
##### check for pcsc ############################
if( WITH_PCSC )
if( WITH_TDEHWLIB AND WITH_PCSC )
pkg_search_module( PCSCLITE libpcsclite )
if( NOT PCSCLITE_FOUND )
find_path( PCSCLITE_INCLUDE_DIR pcsclite.h
HINTS /usr/include/PCSC )
find_library( PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC )
@ -766,16 +768,17 @@ if( WITH_PCSC )
set( PCSCLITE_INCLUDE_DIRS ${PCSCLITE_INCLUDE_DIR} )
set( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} )
endif( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
endif( NOT PCSCLITE_FOUND )
if( NOT PCSCLITE_FOUND )
tde_message_fatal( "PCSCLITE is requested, but not found on your system" )
endif( NOT PCSCLITE_FOUND )
set( HAVE_PCSC_SUPPORT 1 )
endif( WITH_PCSC )
endif( WITH_TDEHWLIB AND WITH_PCSC )
##### check for pkcs ############################
if( WITH_PKCS )
if( WITH_TDEHWLIB AND WITH_PKCS )
pkg_search_module( LIBPKCS11-HELPER libpkcs11-helper-1 )
if( NOT LIBPKCS11-HELPER_FOUND )
message(FATAL_ERROR "\nPKCS support was requested, but libpkcs11-helper-1 was not found on your system" )
@ -797,7 +800,7 @@ endif( )
##### check for pkcs ############################
if( WITH_CRYPTSETUP )
if( WITH_TDEHWLIB AND WITH_CRYPTSETUP )
pkg_search_module( LIBCRYPTSETUP libcryptsetup )
if( NOT LIBCRYPTSETUP_FOUND )
find_library( LIBCRYPTSETUP_LIBRARY cryptsetup )

Loading…
Cancel
Save