Merge pull request #128 from Deiz/optional-webkit
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 1 Jul 2015 18:50:58 +0000 (20:50 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 1 Jul 2015 18:50:58 +0000 (20:50 +0200)
Respect WITH_WEBKIT when defining HAVE_WEBKIT

CMakeLists.txt
src/qtui/CMakeLists.txt

index 3028a42..1a22fac 100644 (file)
@@ -240,7 +240,11 @@ if (USE_QT5)
                 )
             endif()
         endif()
-        add_feature_info("WITH_WEBKIT, QtWebKit and QtWebKitWidgets modules" Qt5WebKitWidgets_FOUND "Support showing previews for URLs in chat")
+
+        if (WITH_WEBKIT AND Qt5WebKitWidgets_FOUND)
+            set(HAVE_WEBKIT true)
+        endif()
+        add_feature_info("WITH_WEBKIT, QtWebKit and QtWebKitWidgets modules" HAVE_WEBKIT "Support showing previews for URLs in chat")
 
         # KDE Frameworks
         ################
index be9a14b..13279ba 100644 (file)
@@ -130,7 +130,7 @@ if (QT_QTDBUS_FOUND OR Qt5DBus_FOUND)
     qt_add_dbus_adaptor  (SOURCES ../../interfaces/org.kde.StatusNotifierItem.xml statusnotifieritemdbus.h StatusNotifierItemDBus)
 endif()
 
-if (QT_QTWEBKIT_FOUND OR Qt5WebKitWidgets_FOUND)
+if (HAVE_WEBKIT)
     add_definitions(-DHAVE_WEBKIT)
     list(APPEND QT_MODULES WebKit)
     if (USE_QT5)