diff --git a/nymea-app/nymea-app.pro b/nymea-app/nymea-app.pro index 1de41048..c732e74e 100644 --- a/nymea-app/nymea-app.pro +++ b/nymea-app/nymea-app.pro @@ -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 diff --git a/nymea-app/platformintegration/generic/platformhelpergeneric.cpp b/nymea-app/platformintegration/generic/platformhelpergeneric.cpp index c1709689..8f244a72 100644 --- a/nymea-app/platformintegration/generic/platformhelpergeneric.cpp +++ b/nymea-app/platformintegration/generic/platformhelpergeneric.cpp @@ -36,11 +36,15 @@ Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntegration) #include +#ifdef HAVE_WEBVIEW #include +#endif PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent) { +#ifdef HAVE_WEBVIEW QtWebView::initialize(); +#endif m_screenHelper = new ScreenHelper(this); } diff --git a/packaging/ubuntu/debian/control b/packaging/ubuntu/debian/control index 9f7e9429..9d3db50e 100644 --- a/packaging/ubuntu/debian/control +++ b/packaging/ubuntu/debian/control @@ -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,