diff options
| author | ruki <[email protected]> | 2024-11-08 20:22:31 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-08 20:22:31 +0800 |
| commit | b644871f11652acb0b77f7e480f7b10ce0ea1715 (patch) | |
| tree | a3db2e4351a9c483fbf5b5034a629851adf718f9 | |
| parent | fa34c04745a093ebcc34d9dfd2da5623c3f3148c (diff) | |
Update find_qt.lua
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 9d09ea621..1a9e79f76 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -192,7 +192,18 @@ end -- get qt environment function _get_qtenvs(qmake) local envs = {} - local results = try {function () return os.iorunv(qmake, {"-query"}) end} + local results = try { + function () + return os.iorunv(qmake, {"-query"}) + end, + catch { + function (errors) + if errors then + dprint(tostring(errors)) + end + end + } + } if results then for _, qtenv in ipairs(results:split('\n', {plain = true})) do local kv = qtenv:split(':', {plain = true, limit = 2}) -- @note set limit = 2 for supporting value with win-style path, e.g. `key:C:\xxx` @@ -201,10 +212,6 @@ function _get_qtenvs(qmake) end end return envs - else - if option.get("verbose") then - print("qmake -query failed") - end end end |
