Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve user experience #5804

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions xmake/modules/detect/sdks/find_qt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,27 @@ 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`
if #kv == 2 then
envs[kv[1]] = kv[2]:trim()
end
end
return envs
end
return envs
end

-- find qt sdk toolchains
Expand Down
Loading