Add Qt webview (#2232)
* Add Qt webview * WebKit * Delete xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua According to https://doc.qt.io/qt-5/qtwebview.html the right include is QtWebView * Update xmake.lua * Create qt5webview * Delete xmake.lua * Update xmake.lua * Update xmake.lua * Delete qt5webview * Create xmake.lua * qt5webview: disable MinGW --------- Co-authored-by: Jérôme Leclercq <lynix680@gmail.com>pull/1672/head^2
parent
0183e7da9e
commit
bf1b6d5684
3 changed files with 31 additions and 2 deletions
@ -0,0 +1,29 @@ |
|||||||
|
package("qt5webview") |
||||||
|
set_base("qt5lib") |
||||||
|
set_kind("library") |
||||||
|
|
||||||
|
on_load(function (package) |
||||||
|
package:add("deps", "qt5core", "qt5gui", {debug = package:is_debug(), version = package:version_str()}) |
||||||
|
package:data_set("libname", "WebView") |
||||||
|
|
||||||
|
package:base():script("load")(package) |
||||||
|
package:set("kind", "library") |
||||||
|
end) |
||||||
|
|
||||||
|
on_install("windows|x86", "windows|x64", "linux", "macosx", "android", "iphoneos", function (package) |
||||||
|
package:base():script("install")(package) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
local cxflags |
||||||
|
if not package:is_plat("windows") then |
||||||
|
cxflags = "-fPIC" |
||||||
|
end |
||||||
|
assert(package:check_cxxsnippets({test = [[ |
||||||
|
int test(int argc, char** argv) { |
||||||
|
QtWebView::initialize(); |
||||||
|
QGuiApplication app (argc, argv); |
||||||
|
return app.exec(); |
||||||
|
} |
||||||
|
]]}, {configs = {languages = "c++14", cxflags = cxflags}, includes = {"QGuiApplication", "QtWebView"}})) |
||||||
|
end) |
Loading…
Reference in new issue