summaryrefslogtreecommitdiff
path: root/xmake/rules/qt/install/mingw.lua
diff options
context:
space:
mode:
authorChan Lee <[email protected]>2025-01-22 17:25:06 +0800
committerChan Lee <[email protected]>2025-01-22 17:25:06 +0800
commitbb89dfcc8a32c401b2208ce9c1f8a1862bb5a574 (patch)
tree82f71a4c2cfc0343660297ac199fd2b7bc2e61a6 /xmake/rules/qt/install/mingw.lua
parentc61d7bb40353b161da913bdcbc6fa399e36164a1 (diff)
Add `qt_host` option to enable cross-platform Qt Builds using host SDK tools
Diffstat (limited to 'xmake/rules/qt/install/mingw.lua')
-rw-r--r--xmake/rules/qt/install/mingw.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/qt/install/mingw.lua b/xmake/rules/qt/install/mingw.lua
index 9bf282c23..4e3fe6d19 100644
--- a/xmake/rules/qt/install/mingw.lua
+++ b/xmake/rules/qt/install/mingw.lua
@@ -23,6 +23,7 @@ import("core.base.option")
import("core.project.config")
import("core.tool.toolchain")
import("lib.detect.find_path")
+import("lib.detect.find_file")
import("detect.sdks.find_qt")
-- get install directory
@@ -42,7 +43,10 @@ function main(target, opt)
local qt = assert(find_qt(), "Qt SDK not found!")
-- get windeployqt
- local windeployqt = path.join(qt.bindir, "windeployqt.exe")
+ local search_dirs = {}
+ if qt.bindir_host then table.insert(search_dirs, qt.bindir_host) end
+ if qt.bindir then table.insert(search_dirs, qt.bindir) end
+ local windeployqt = find_file("windeployqt" .. (is_host("windows") and ".exe" or ""), search_dirs)
assert(os.isexec(windeployqt), "windeployqt.exe not found!")
-- find qml directory