Improve Qt packages
This commit is contained in:
@@ -16,9 +16,9 @@ package("qt5widgets")
|
||||
end
|
||||
|
||||
return {
|
||||
includedirs = {qt.includedir, path.join(qt.includedir, "QtWidgets")},
|
||||
links = table.wrap("Qt5Widgets" .. (package:is_plat("windows") and package:is_debug() and "d" or "")),
|
||||
linkdirs = table.wrap(qt.libdir),
|
||||
includedirs = table.wrap(qt.includedir)
|
||||
linkdirs = table.wrap(qt.libdir)
|
||||
}
|
||||
end)
|
||||
|
||||
@@ -29,4 +29,14 @@ package("qt5widgets")
|
||||
end)
|
||||
|
||||
on_test(function (package)
|
||||
assert(package:check_cxxsnippets({test = [[
|
||||
int test(int argc, char** argv) {
|
||||
QApplication app (argc, argv);
|
||||
|
||||
QPushButton button ("Hello world !");
|
||||
button.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
]]}, {configs = {languages = "c++14", cxflags = not package:is_plat("windows") and "-fPIC" or nil}, includes = {"QApplication", "QPushButton"}}))
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user