From: Manuel Nickschas Date: Tue, 10 Jun 2008 15:10:45 +0000 (+0200) Subject: Fix OpenSSL on Windows X-Git-Tag: 0.3.0~371^2~7 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d226ad424a16011a5751e80b853de7bc0b2e0674 Fix OpenSSL on Windows --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2490abd6..e1b2427c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,13 @@ else(BUILD MATCHES all) endif(BUILD MATCHES mono) endif(BUILD MATCHES all) +# Enable mostly b0rked stuff (new ChatView), do not enable this unless you know what you do... +if(SPUTDEV) + add_definitions(-DSPUTDEV) +endif(SPUTDEV) + +find_package(OpenSSL) + # Select a Qt installation here, if you don't want to use system Qt if(DEFINED QT) # FindQt4 will look for the qmake binary in $PATH, so we just prepend the Qt dir @@ -57,11 +64,6 @@ if(DEFINED QT) #SET(QT_QMAKE_EXECUTABLE ${QT}/bin/qmake CACHE FILEPATH "" FORCE) endif(DEFINED QT) -# Enable mostly b0rked stuff (new ChatView), do not enable this unless you know what you do... -if(SPUTDEV) - add_definitions(-DSPUTDEV) -endif(SPUTDEV) - # Now that we have the correct $PATH, lets find Qt! find_package(Qt4 REQUIRED) @@ -111,6 +113,9 @@ endif(DEFINED STATIC) if(STATICWIN AND WIN32) link_libraries(imm32 winmm) # missing by default :/ + if(OPENSSL_FOUND) + link_libraries(libeay32MD ssleay32MD) + endif(OPENSSL_FOUND) endif(STATICWIN AND WIN32) if(WIN32) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 442e1051..294fb4c9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -47,12 +47,10 @@ set(HEADERS # 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") +if(OPENSSL_FOUND AND NOT QT_DEFINITIONS MATCHES "-DQT_NO_OPENSSL") set(SOURCES ${SOURCES} sslserver.cpp) set(MOC_HDRS ${MOC_HDRS} sslserver.h) -endif(OPENSSL_FOUND AND NOT ${QT_DEFINITIONS} MATCHES "-DQT_NO_OPENSSL") +endif(OPENSSL_FOUND AND NOT QT_DEFINITIONS MATCHES "-DQT_NO_OPENSSL") QT4_WRAP_CPP(MOC ${MOC_HDRS})