diff options
| author | wzshun <[email protected]> | 2026-04-21 14:03:32 +0800 |
|---|---|---|
| committer | wzshun <[email protected]> | 2026-04-21 14:03:32 +0800 |
| commit | f068a1ed6b0424e67412bc76547cabb8cfc4ed2c (patch) | |
| tree | 41ccc5e804398b99bb0bf20276838b1d6deee572 | |
| parent | 0b1f29fd246e26b128eb6c7d7ffe9aa087e0a29d (diff) | |
fix review issues
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 18 |
1 files 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 |
