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

Fix syslinks error using qt static lib in mingw #5202

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Changes from 2 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
5 changes: 4 additions & 1 deletion xmake/rules/qt/load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ function _add_qmakeprllibs(target, prlfile, qtlibdir)
target:add("linkdirs", libdir)
else
local libstr = string.gsub(lib, "%$%$%[QT_INSTALL_LIBS%]", qtlibdir)
if libstr:startswith("-l") then
libstr = lib:sub(3)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是应该 libstr:sub 么?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不好意思,这里我漏看了,但是效果一样。新的提交应该是改了,但是刚才我误操作了force push不知道会不会影响

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只要最终 patch 没问题就行

end
target:add("syslinks", libstr)
end
end
Expand Down Expand Up @@ -261,6 +264,7 @@ function main(target, opt)
target:set("syslinks", nil)

-- add qt links and directories
target:add("syslinks", target:values("qt.links"))
local qtprldirs = {}
for _, qt_linkdir in ipairs(target:values("qt.linkdirs")) do
local linkdir = path.join(qt.sdkdir, qt_linkdir)
Expand All @@ -275,7 +279,6 @@ function main(target, opt)
_add_qmakeprllibs(target, prl_file, qt.libdir)
end
end
target:add("syslinks", target:values("qt.links"))

-- backup qt frameworks
local qt_frameworks = target:get("frameworks")
Expand Down