diff options
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 38ce5f045..5230577e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,26 +756,29 @@ endif( WITH_LZMA ) ##### check for pcsc ############################ -if( WITH_PCSC ) - find_path( PCSCLITE_INCLUDE_DIR pcsclite.h - HINTS /usr/include/PCSC ) - find_library( PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC ) - if( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR ) - message( STATUS "Found PCSCLITE: ${PCSCLITE_LIBRARY}" ) - set( PCSCLITE_FOUND 1 ) - set( PCSCLITE_INCLUDE_DIRS ${PCSCLITE_INCLUDE_DIR} ) - set( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} ) - endif( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR ) +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 ) + if( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR ) + message( STATUS "Found PCSCLITE: ${PCSCLITE_LIBRARY}" ) + set( PCSCLITE_FOUND 1 ) + 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 ) |