From f068a1ed6b0424e67412bc76547cabb8cfc4ed2c Mon Sep 17 00:00:00 2001 From: wzshun <281115606@qq.com> Date: Tue, 21 Apr 2026 14:03:32 +0800 Subject: fix review issues --- xmake/modules/detect/sdks/find_qt.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 14a3de32b..ee5580b10 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -290,15 +290,15 @@ function _find_qt(sdkdir, sdkver, sdkdir_host) local mkspec = qtenvs.QMAKE_XSPEC or qtenvs.QMAKE_SPEC -- handle qt sysroot - if qtenvs.QT_SYSROOT and qtenvs.QT_SYSROOT ~= "" then - local qt_sysroot = qtenvs.QT_SYSROOT - sdkdir = qt_sysroot .. sdkdir - bindir = qt_sysroot .. bindir - libexecdir = qt_sysroot .. libexecdir - qmldir = qt_sysroot .. qmldir - libdir = qt_sysroot .. libdir - pluginsdir = qt_sysroot .. pluginsdir - includedir = qt_sysroot .. includedir + local qt_sysroot = qtenvs.QT_SYSROOT or "" + if #qt_sysroot > 0 and path.isdir(qt_sysroot) then + sdkdir = path.join(qt_sysroot, sdkdir) + bindir = path.join(qt_sysroot, bindir) + libexecdir = path.join(qt_sysroot, libexecdir) + qmldir = path.join(qt_sysroot, qmldir) + libdir = path.join(qt_sysroot, libdir) + pluginsdir = path.join(qt_sysroot, pluginsdir) + includedir = path.join(qt_sysroot, includedir) end -- for 6.2 -- cgit v1.3.1