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

User's qt.deploy.flags should have priority over defaults #5351

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 8 additions & 5 deletions xmake/rules/qt/install/mingw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,21 @@ function main(target, opt)
table.insert(argv, "--verbose=0")
end

if is_mode("debug") then
table.insert(argv, "--debug")
else
table.insert(argv, "--release")
-- make sure user flags have priority over default
local user_flags = target:values("qt.deploy.flags")
if not user_flags or not (user_flags:find("--debug", 1, true) or user_flags:find("--release", 1, true)) then
if is_mode("debug") then
table.insert(argv, "--debug")
else
table.insert(argv, "--release")
end
end

if qmldir then
table.insert(argv, "--qmldir=" .. qmldir)
end

-- add user flags
local user_flags = target:values("qt.deploy.flags") or {}
if user_flags then
argv = table.join(argv, user_flags)
end
Expand Down
13 changes: 8 additions & 5 deletions xmake/rules/qt/install/windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,21 @@ function main(target, opt)
table.insert(argv, "--verbose=0")
end

if is_mode("debug") then
table.insert(argv, "--debug")
else
table.insert(argv, "--release")
-- make sure user flags have priority over default
local user_flags = target:values("qt.deploy.flags")
if not user_flags or not (user_flags:find("--debug", 1, true) or user_flags:find("--release", 1, true)) then
if is_mode("debug") then
table.insert(argv, "--debug")
else
table.insert(argv, "--release")
end
end

if qmldir then
table.insert(argv, "--qmldir=" .. qmldir)
end

-- add user flags
local user_flags = target:values("qt.deploy.flags") or {}
if user_flags then
argv = table.join(argv, user_flags)
end
Expand Down
Loading