summaryrefslogtreecommitdiff
path: root/xmake/rules/qt/ui/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-16 22:45:30 +0800
committerruki <[email protected]>2021-07-16 22:45:30 +0800
commit53aee110c161606152f43a48199f9753c558bee2 (patch)
tree35c9f9e200363c76e738a1852ec15c5ad64e80e1 /xmake/rules/qt/ui/xmake.lua
parenta408b0e6fd6f5592a0dbf5451044a2aafa14edfc (diff)
improve to support qt6
Diffstat (limited to 'xmake/rules/qt/ui/xmake.lua')
-rw-r--r--xmake/rules/qt/ui/xmake.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/qt/ui/xmake.lua b/xmake/rules/qt/ui/xmake.lua
index b1ce103e5..dd377563b 100644
--- a/xmake/rules/qt/ui/xmake.lua
+++ b/xmake/rules/qt/ui/xmake.lua
@@ -24,7 +24,11 @@ rule("qt.ui")
on_load(function (target)
-- get uic
- local uic = path.join(target:data("qt").bindir, is_host("windows") and "uic.exe" or "uic")
+ local qt = assert(target:data("qt"), "qt not found!")
+ local uic = path.join(qt.bindir, is_host("windows") and "uic.exe" or "uic")
+ if not os.isexec(uic) and qt.libexecdir then
+ uic = path.join(qt.libexecdir, is_host("windows") and "uic.exe" or "uic")
+ end
assert(uic and os.isexec(uic), "uic not found!")
-- add includedirs, @note we need create this directory first to suppress warning (file not found).