Skip to content

Commit

Permalink
Qt: enhance cross-compilation support for desktop platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Doekin committed Jan 23, 2025
1 parent 59e0522 commit 29f31f9
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 280 deletions.
32 changes: 32 additions & 0 deletions packages/q/qt-tools/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package("qt-tools")
set_kind("binary")
set_base("qtbase")

-- Please ensure these versions are synchronized with qt5base and qt5lib
add_versions("5.15.2", "dummy")
add_versions("5.12.5", "dummy")

-- Please ensure these versions are synchronized with qt6base and qt6lib
add_versions("6.3.0", "dummy")
add_versions("6.3.1", "dummy")
add_versions("6.3.2", "dummy")
add_versions("6.4.0", "dummy")
add_versions("6.4.1", "dummy")
add_versions("6.4.2", "dummy")
add_versions("6.4.3", "dummy")
add_versions("6.5.0", "dummy")
add_versions("6.5.1", "dummy")
add_versions("6.5.2", "dummy")
add_versions("6.5.3", "dummy")
add_versions("6.6.0", "dummy")
add_versions("6.6.1", "dummy")
add_versions("6.6.2", "dummy")
add_versions("6.6.3", "dummy")
add_versions("6.7.0", "dummy")
add_versions("6.7.1", "dummy")
add_versions("6.7.2", "dummy")
add_versions("6.8.0", "dummy")

on_install("windows", "linux", "macosx", function (package)
package:base():script("install")(package)
end)
11 changes: 10 additions & 1 deletion packages/q/qt6base/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package("qt6base")
set_kind("phony")
set_base("qtbase")

-- Please ensure these versions are synchronized with qt6lib and qt-tools
add_versions("6.3.0", "dummy")
add_versions("6.3.1", "dummy")
add_versions("6.3.2", "dummy")
Expand All @@ -22,6 +23,14 @@ package("qt6base")
add_versions("6.7.2", "dummy")
add_versions("6.8.0", "dummy")

on_install("windows|x64", "linux|x86_64", "macosx", "mingw|x86_64", function (package)
on_install("windows|x64,linux|x86_64,macosx,mingw|x86_64@windows,linux,macosx", function (package)
package:base():script("install")(package)
end)

on_install("android|arm64-v8a,armeabi-v7a,armeabi,x86_64,x86@windows,linux,macosx", function (package)
package:base():script("install")(package)
end)

on_install("iphoneos,wasm@windows,linux,macosx", function (package)
package:base():script("install")(package)
end)
13 changes: 12 additions & 1 deletion packages/q/qt6lib/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package("qt6lib")
add_configs("shared", {description = "Download shared binaries.", default = true, type = "boolean", readonly = true})
add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})

-- Please ensure these versions are synchronized with qt6base and qt-tools
add_versions("6.3.0", "dummy")
add_versions("6.3.1", "dummy")
add_versions("6.3.2", "dummy")
Expand Down Expand Up @@ -88,7 +89,17 @@ package("qt6lib")
}
end)

on_install("windows|x64", "linux|x86_64", "macosx", "mingw|x86_64", function (package)
on_install("windows|x64,linux|x86_64,macosx,mingw|x86_64@windows,linux,macosx", function (package)
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)

on_install("iphoneos,wasm@windows,linux,macosx", function (package)
local qt = package:dep("qt6base"):data("qt")
assert(qt, "qt6base is required")
end)
Loading

0 comments on commit 29f31f9

Please sign in to comment.