From 0ef2797c935b8cba29b667da150c8ab9117b0647 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 7 Jun 2008 03:38:00 +0200 Subject: [PATCH] Look for OpenSSL. Apparently we can't easily check if Qt has SSL support, so we check for an installed OpenSSL to at least catch some cases where we have to disable support. Apparently, stuff still compiles even if SSL is not there, since all is #ifdef'd out... --- src/core/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index fed2b779..156b84e4 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -40,10 +40,15 @@ set(HEADERS sessionthread.h userinputhandler.h) -if(NOT ${QT_DEFINITIONS} MATCHES "-DQT_NO_OPENSSL") +# QT_DEFINITIONS actually does not work, stuff gets included always. +# Funny enough that does not seem to be harmful, but we should still find a way to figure out +# if we have openssl in Qt... +find_package(OpenSSL) + +if(OPENSSL_FOUND AND NOT ${QT_DEFINITIONS} MATCHES "-DQT_NO_OPENSSL") set(SOURCES ${SOURCES} sslserver.cpp) set(HEADERS ${HEADERS} sslserver.h) -endif(NOT ${QT_DEFINITIONS} MATCHES "-DQT_NO_OPENSSL") +endif(OPENSSL_FOUND AND NOT ${QT_DEFINITIONS} MATCHES "-DQT_NO_OPENSSL") QT4_WRAP_CPP(MOC ${HEADERS}) -- 2.20.1