Look for OpenSSL.
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 7 Jun 2008 01:38:00 +0000 (03:38 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 7 Jun 2008 01:38:00 +0000 (03:38 +0200)
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

index fed2b77..156b84e 100644 (file)
@@ -40,10 +40,15 @@ set(HEADERS
     sessionthread.h
     userinputhandler.h)
 
     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)
   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})
 
 
 QT4_WRAP_CPP(MOC ${HEADERS})