optional-qtwebengine-08-48ae2945e02218c0793977f4e90cefc4cd2ac75a
authorDebian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Sat, 29 Jun 2019 01:02:25 +0000 (02:02 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Sat, 29 Jun 2019 01:02:25 +0000 (02:02 +0100)
commit 48ae2945e02218c0793977f4e90cefc4cd2ac75a
Author: Nathan Ho <nathan@snappizz.com>
Date:   Sun Jun 2 01:43:42 2019 -0700

    cmake: include all C++ files in target even if no objects

Gbp-Pq: Name optional-qtwebengine-08-48ae2945e02218c0793977f4e90cefc4cd2ac75a

QtCollider/CMakeLists.txt
QtCollider/widgets/QcWebView.cpp
QtCollider/widgets/web_page.cpp
editors/sc-ide/CMakeLists.txt
lang/CMakeLists.txt

index f409979fe83877875e758c23d6b0ce6738c78479..f9da30da970d675b8fe086b408588c30be92f767 100644 (file)
@@ -125,6 +125,7 @@ set( QT_COLLIDER_SRCS
   ${QT_COLLIDER_DIR}/widgets/QcScope.cpp
   ${QT_COLLIDER_DIR}/widgets/QcScopeShm.cpp
   ${QT_COLLIDER_DIR}/widgets/QcLevelIndicator.cpp
+  ${QT_COLLIDER_DIR}/widgets/QcWebView.cpp
   ${QT_COLLIDER_DIR}/widgets/QcWindow.cpp
   ${QT_COLLIDER_DIR}/widgets/QcGraph.cpp
   ${QT_COLLIDER_DIR}/widgets/QcCanvas.cpp
@@ -133,6 +134,7 @@ set( QT_COLLIDER_SRCS
   ${QT_COLLIDER_DIR}/widgets/soundfileview/cachestream.cpp
   ${QT_COLLIDER_DIR}/widgets/QcFileDialog.cpp
   ${QT_COLLIDER_DIR}/widgets/QcPenPrinter.cpp
+  ${QT_COLLIDER_DIR}/widgets/web_page.cpp
   ${QT_COLLIDER_DIR}/layouts/layouts.cpp
   ${QT_COLLIDER_DIR}/layouts/stack_layout.cpp
   ${QT_COLLIDER_DIR}/style/ProxyStyle.cpp
@@ -151,10 +153,6 @@ set(QT_COLLIDER_WEBENGINE_HDRS
 
 if(SC_USE_WEBENGINE)
   list(APPEND QT_COLLIDER_HDRS ${QT_COLLIDER_WEBENGINE_HDRS})
-  list(APPEND QT_COLLIDER_SRCS
-    ${QT_COLLIDER_DIR}/widgets/QcWebView.cpp
-    ${QT_COLLIDER_DIR}/widgets/web_page.cpp
-  )
 endif()
 
 ###############################################################################
index b176ab795e861a2ff3dafa0205410a5ed1de0fa8..be781a6d1af447338e407235797667131fe39b0e 100644 (file)
 *
 ************************************************************************/
 
-#include "QcWebView.h"
-#include "../widgets/web_page.hpp"
-#include "../QcWidgetFactory.h"
-#include <QWebEnginePage>
-#include <QWebEngineSettings>
-#include <QWebEngineContextMenuData>
-#include <QAction>
-#include <QMenu>
-#include <QShortcut>
-#include <QKeyEvent>
-#include <QApplication>
-#include <QStyle>
-#include <QWebEngineCallback>
+#ifdef SC_USE_WEBENGINE
+
+#    include "QcWebView.h"
+#    include "../widgets/web_page.hpp"
+#    include "../QcWidgetFactory.h"
+#    include <QWebEnginePage>
+#    include <QWebEngineSettings>
+#    include <QWebEngineContextMenuData>
+#    include <QAction>
+#    include <QMenu>
+#    include <QShortcut>
+#    include <QKeyEvent>
+#    include <QApplication>
+#    include <QStyle>
+#    include <QWebEngineCallback>
 
 QC_DECLARE_QWIDGET_FACTORY(WebView);
 
@@ -321,3 +323,5 @@ void WebView::onLinkClicked(const QUrl &url, QWebEnginePage::NavigationType type
 }
 
 } // namespace QtCollider
+
+#endif // SC_USE_WEBENGINE
index b466e211f58d13518f72c5ccda7f8a850f75ef13..1dbb14f2884738720263d4ebfa9708c0bba98eaf 100644 (file)
 *
 ************************************************************************/
 
-#include "web_page.hpp"
+#ifdef SC_USE_WEBENGINE
 
-#include <QApplication>
-#include <QClipboard>
+#    include "web_page.hpp"
+
+#    include <QApplication>
+#    include <QClipboard>
 
 namespace QtCollider {
 
@@ -60,3 +62,5 @@ bool WebPage::acceptNavigationRequest(const QUrl& url, QWebEnginePage::Navigatio
 }
 
 } // namespace QtCollider
+
+#endif // SC_USE_WEBENGINE
index 50059bc2f2bc593ee90ef83f14a142c07f4199cd..25c39a9f26f4b0e4cfc25df886f1bcd030bad58f 100644 (file)
@@ -337,6 +337,10 @@ if(LTO)
                  APPEND PROPERTY LINK_FLAGS "-flto -flto-report -fwhole-program")
 endif()
 
+if(SC_USE_WEBENGINE)
+    message(STATUS "IDE: Building with QtWebEngine")
+    target_compile_definitions(SuperCollider PUBLIC SC_USE_WEBENGINE)
+endif()
 
 # Installation
 
index 05cd992bcee9335c33f23c6dc0975e40770c9edc..879e0e655617557fad817cfdd883827c475525e3 100644 (file)
@@ -183,7 +183,7 @@ if(SC_QT OR SC_IDE)
     get_filename_component(QT_BIN_PATH ${QtCore_location} DIRECTORY CACHE)
 
   if(SC_USE_WEBENGINE)
-    message(STATUS "Building with QtWebEngine")
+    message(STATUS "sclang: Building with QtWebEngine")
     target_compile_definitions(libsclang PUBLIC SC_USE_WEBENGINE)
   endif()
        target_link_libraries(libsclang ${QT_COLLIDER_LIBS})