From: Manuel Nickschas Date: Sat, 7 Jun 2008 01:38:00 +0000 (+0200) Subject: Look for OpenSSL. X-Git-Tag: 0.3.0~371^2~20 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0ef2797c935b8cba29b667da150c8ab9117b0647;hp=4d01cd257e2bce4434f768b37c19f2701c5dd339 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... --- 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})