commit a34b19c2ca1fa5641a25b5b962a19e0fa5223452
Author: Nathan Ho <nathan@snappizz.com>
Date:   Sun Jun 2 01:43:43 2019 -0700

    scide: Don't compile help browser code if SC_USE_WEBENGINE is off

diff --git a/editors/sc-ide/CMakeLists.txt b/editors/sc-ide/CMakeLists.txt
index 25c39a9f2..77d84e79e 100644
--- a/editors/sc-ide/CMakeLists.txt
+++ b/editors/sc-ide/CMakeLists.txt
@@ -66,8 +66,6 @@ if(APPLE)
     set(AdditionalBundleSources ${ClassLibrary} ${HelpSource} ${BundleResources} ${Examples} ${Sounds} ${Icons})
 endif()
 
-
-
 set ( ide_moc_hdr
     core/main.hpp
     core/sig_mux.hpp
@@ -115,8 +113,6 @@ set ( ide_moc_hdr
     widgets/util/WebSocketTransport.hpp
     widgets/util/WebSocketClientWrapper.hpp
     widgets/util/IDEWebChannelWrapper.hpp
-
-    ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.hpp
 )
 
 file (GLOB_RECURSE all_hdr *hpp)
@@ -148,7 +144,6 @@ set ( ide_src
     widgets/multi_editor.cpp
     widgets/post_window.cpp
     widgets/session_switch_dialog.cpp
-    widgets/help_browser.cpp
     widgets/audio_status_box.cpp
     widgets/lang_status_box.cpp
     widgets/code_editor/editor.cpp
@@ -172,8 +167,6 @@ set ( ide_src
     widgets/util/WebSocketTransport.cpp
     widgets/style/style.cpp
 
-    ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.cpp
-
     ${CMAKE_SOURCE_DIR}/common/SC_TextUtils.cpp
     ${CMAKE_SOURCE_DIR}/common/SC_Filesystem_macos.cpp
     ${CMAKE_SOURCE_DIR}/common/SC_Filesystem_win.cpp
@@ -188,6 +181,20 @@ set ( ide_src
     ${CMAKE_SOURCE_DIR}/SCDoc/lex.scdoc.cpp
 )
 
+set(ide_webengine_moc_hdrs
+    widgets/help_browser.hpp
+    ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.hpp
+)
+set(ide_webengine_src
+    widgets/help_browser.cpp
+    ${CMAKE_SOURCE_DIR}/QtCollider/widgets/web_page.cpp
+)
+
+if(SC_USE_WEBENGINE)
+    list(APPEND ide_moc_hdr ${ide_webengine_moc_hdrs})
+    list(APPEND ide_src ${ide_webengine_src})
+endif()
+
 set( ide_forms
     forms/settings_dialog.ui
     forms/settings_general.ui
diff --git a/editors/sc-ide/widgets/help_browser.cpp b/editors/sc-ide/widgets/help_browser.cpp
index 089c0deed..5a9dd44f0 100644
--- a/editors/sc-ide/widgets/help_browser.cpp
+++ b/editors/sc-ide/widgets/help_browser.cpp
@@ -18,32 +18,34 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */
 
-#define QT_NO_DEBUG_OUTPUT
-
-#include "help_browser.hpp"
-#include "main_window.hpp"
-#include "../core/sc_process.hpp"
-#include "../core/main.hpp"
-#include "../core/util/overriding_action.hpp"
-#include "QtCollider/widgets/web_page.hpp"
-#include "QtCollider/hacks/hacks_qt.hpp"
-
-#include <QVBoxLayout>
-#include <QToolBar>
-#include <QWebEngineSettings>
-#include <QWebEngineContextMenuData>
-#include <QAction>
-#include <QMenu>
-#include <QStyle>
-#include <QShortcut>
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QDebug>
-#include <QKeyEvent>
-
-#ifdef Q_OS_MAC
-#    include <QStyleFactory> // QStyleFactory::create, see below
-#endif
+#ifdef SC_USE_WEBENGINE
+
+#    define QT_NO_DEBUG_OUTPUT
+
+#    include "help_browser.hpp"
+#    include "main_window.hpp"
+#    include "../core/sc_process.hpp"
+#    include "../core/main.hpp"
+#    include "../core/util/overriding_action.hpp"
+#    include "QtCollider/widgets/web_page.hpp"
+#    include "QtCollider/hacks/hacks_qt.hpp"
+
+#    include <QVBoxLayout>
+#    include <QToolBar>
+#    include <QWebEngineSettings>
+#    include <QWebEngineContextMenuData>
+#    include <QAction>
+#    include <QMenu>
+#    include <QStyle>
+#    include <QShortcut>
+#    include <QApplication>
+#    include <QDesktopWidget>
+#    include <QDebug>
+#    include <QKeyEvent>
+
+#    ifdef Q_OS_MAC
+#        include <QStyleFactory> // QStyleFactory::create, see below
+#    endif
 
 namespace ScIDE {
 
@@ -70,11 +72,11 @@ HelpBrowser::HelpBrowser(QWidget* parent): QWidget(parent) {
     // get in the way of rendering web pages
     mWebView->setPalette(style()->standardPalette());
 
-#ifdef Q_OS_MAC
+#    ifdef Q_OS_MAC
     // On macOS, checkboxes unwantedly appear in the top left-hand corner.
     // See QTBUG-43366, 43070, and 42948. The workaround is to set style to fusion.
     mWebView->setStyle(QStyleFactory::create("Fusion"));
-#endif
+#    endif
 
     mWebView->installEventFilter(this);
 
@@ -475,3 +477,5 @@ HelpBrowserDocklet::HelpBrowserDocklet(QWidget* parent): Docklet(tr("Help browse
 }
 
 } // namespace ScIDE
+
+#endif // SC_USE_WEBENGINE
