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
Maxime 2 years ago committed by GitHub
parent 0183e7da9e
commit bf1b6d5684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/q/qt5base/xmake.lua
  2. 2
      packages/q/qt5lib/xmake.lua
  3. 29
      packages/q/qt5webview/xmake.lua

@ -43,7 +43,7 @@ package("qt5base")
return qt
end)
on_install("windows", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
on_install("windows|x86", "windows|x64", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
import("core.base.semver")
import("core.project.config")
import("core.tool.toolchain")

@ -73,7 +73,7 @@ package("qt5lib")
}
end)
on_install("windows", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
on_install("windows|x86", "windows|x64", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
local qt = package:dep("qt5base"):data("qt")
assert(qt, "qt5base is required")
end)

@ -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…
Cancel
Save