-
-
Notifications
You must be signed in to change notification settings - Fork 509
Add xmake.lua for qt6quickcontrols2 package #9304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package("qt6quickcontrols2") | ||
| set_base("qt6lib") | ||
| set_kind("library") | ||
|
|
||
| on_load(function (package) | ||
| package:add("deps", "qt6quick", "qt6qml", "qt6gui", "qt6core", {debug = package:is_debug(), version = package:version_str()}) | ||
| package:data_set("libname", "QuickControls2") | ||
|
|
||
| package:base():script("load")(package) | ||
| end) | ||
|
|
||
| on_test(function (package) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move on_test to the bottom |
||
| local cxflags | ||
| if package:is_plat("windows") then | ||
| cxflags = {"/Zc:__cplusplus", "/permissive-"} | ||
| else | ||
| cxflags = "-fPIC" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, |
||
| end | ||
|
|
||
| assert(package:check_cxxsnippets({test = [[ | ||
| void test() { | ||
| QQuickStyle::setStyle("Material"); | ||
| } | ||
| ]]}, { | ||
| configs = {languages = "c++17", cxflags = cxflags}, | ||
| includes = {"QQuickStyle"} | ||
| })) | ||
| end) | ||
|
|
||
| on_install("windows|x64,linux|x86_64,linux|arm64,macosx,mingw|x86_64@windows,linux,macosx", function (package) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? remove it. see other qt6xxx packages |
||
| local qt = package:dep("qt6base"):data("qt") | ||
| assert(qt, "qt6base is required") | ||
| end) | ||
|
|
||
| on_install("android|arm64-v8a,armeabi-v7a,armeabi,x86_64,x86@windows,linux,macosx", function (package) | ||
| local qt = package:dep("qt6base"):data("qt") | ||
| assert(qt, "qt6base is required") | ||
| end) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dependencies
qt6qml,qt6gui, andqt6coreare transitive dependencies ofqt6quick. You can simplify this declaration by only listingqt6quickas a direct dependency. This improves maintainability by relying on the dependency graph already defined in theqt6quickpackage.