diff options
-rw-r--r-- | src/qtwebkit-test.cpp | 22 | ||||
-rw-r--r-- | src/qtwebkit.mk | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/qtwebkit-test.cpp b/src/qtwebkit-test.cpp new file mode 100644 index 0000000..1248de7 --- /dev/null +++ b/src/qtwebkit-test.cpp @@ -0,0 +1,22 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + * + * from: https://github.com/mxe/mxe/issues/1868 + */ + + +#include <QApplication> + +#include <QtWebKitWidgets/QWebView> +#include <QtWebKitWidgets/QWebFrame> + +int main(int argc, char **argv){ + + QApplication app(argc, argv); + + QWebView *view = new QWebView(); + view->load(QUrl("http://google.com/")); + view->show(); + + app.exec(); +} diff --git a/src/qtwebkit.mk b/src/qtwebkit.mk index c3bcd5d..6ef3984 100644 --- a/src/qtwebkit.mk +++ b/src/qtwebkit.mk @@ -19,4 +19,18 @@ define $(PKG)_BUILD_SHARED cd '$(BUILD_DIR)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(SOURCE_DIR)' $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # build test manually + # add $(BUILD_TYPE_SUFFIX) for debug builds - see qtbase.mk + $(TARGET)-g++ \ + -W -Wall -std=c++11 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config Qt5WebKitWidgets --cflags --libs` + + # batch file to run test programs + (printf 'set PATH=..\\lib;..\\qt5\\bin;..\\qt5\\lib;%%PATH%%\r\n'; \ + printf 'set QT_QPA_PLATFORM_PLUGIN_PATH=..\\qt5\\plugins\r\n'; \ + printf 'test-$(PKG).exe\r\n'; \ + printf 'cmd\r\n';) \ + > '$(PREFIX)/$(TARGET)/bin/test-$(PKG).bat' endef |