diff options
| author | Chan Lee <[email protected]> | 2025-01-22 17:25:06 +0800 |
|---|---|---|
| committer | Chan Lee <[email protected]> | 2025-01-22 17:25:06 +0800 |
| commit | bb89dfcc8a32c401b2208ce9c1f8a1862bb5a574 (patch) | |
| tree | 82f71a4c2cfc0343660297ac199fd2b7bc2e61a6 /xmake/rules/qt/install/mingw.lua | |
| parent | c61d7bb40353b161da913bdcbc6fa399e36164a1 (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.lua | 6 |
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 |
