Make the webview optional

pull/957/head
Michael Zanetti 2023-01-24 20:16:33 +01:00
parent 65c39c3c92
commit eda1e02075
3 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,11 @@ TARGET=$${APPLICATION_NAME}
CONFIG += link_pkgconfig
QT += network qml quick quickcontrols2 svg websockets bluetooth charts gui-private nfc
!ubports: QT += webview
qtHaveModule(webview) {
QT += webview
DEFINES += HAVE_WEBVIEW
}
INCLUDEPATH += $$top_srcdir/libnymea-app
LIBS += -L$$top_builddir/libnymea-app/ -lnymea-app

View File

@ -36,11 +36,15 @@
Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntegration)
#include <QProcess>
#ifdef HAVE_WEBVIEW
#include <QtWebView>
#endif
PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent)
{
#ifdef HAVE_WEBVIEW
QtWebView::initialize();
#endif
m_screenHelper = new ScreenHelper(this);
}

View File

@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9.0.0),
libqt5charts5-dev,
libqt5svg5-dev,
libqt5websockets5-dev,
libqt5webview5-dev,
libqt5webview5-dev [!riscv64],
qtbase5-dev,
qttools5-dev-tools,
qtconnectivity5-dev,