diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46895666..0c78d15c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -303,8 +303,20 @@ endif() option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON) if(ENABLE_GNUTLS) find_package(GnuTLS) + find_package(Gcrypt) + find_package(Gpg_Error) if (GNUTLS_FOUND) include_directories(${GNUTLS_INCLUDE_DIR}) + if (GCRYPT_FOUND) + include_directories(${GCRYPT_INCLUDE_DIR}) + set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES};${GCRYPT_LIBRARIES}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GCRYPT_LIBRARIES}) + if (GPG_ERROR_FOUND) + include_directories(${GPG_ERROR_INCLUDE_DIR}) + set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES};${GPG_ERROR_LIBRARIES}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GPG_ERROR_LIBRARIES}) + endif() + endif() add_definitions("-DHAVE_GNUTLS") add_definitions(${GNUTLS_DEFINITIONS}) |