Skip to content

Commit

Permalink
Merge pull request #5567 from xmake-io/runtimes
Browse files Browse the repository at this point in the history
fix requirekey for runtimes #5538
  • Loading branch information
waruqi authored Sep 4, 2024
2 parents a54fed5 + ed170fa commit 2b7f8c1
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions xmake/modules/private/action/require/impl/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -587,20 +587,19 @@ function _finish_requireinfo(requireinfo, package)
package:arch_set(requireinfo.arch)
end
requireinfo.configs = requireinfo.configs or {}
if not package:is_headeronly() then
if package:is_plat("windows") then
-- @see https://github.com/xmake-io/xmake/issues/4477#issuecomment-1913249489
local runtimes = requireinfo.configs.runtimes
if runtimes then
runtimes = runtimes:split(",")
else
runtimes = {}
end
if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then
table.insert(runtimes, "MT")
end
requireinfo.configs.runtimes = table.concat(runtimes, ",")
if package:is_plat("windows") then
-- @see https://github.com/xmake-io/xmake/issues/4477#issuecomment-1913249489
-- @note its buildhash will be ignored for headeronly
local runtimes = requireinfo.configs.runtimes
if runtimes then
runtimes = runtimes:split(",")
else
runtimes = {}
end
if not table.contains(runtimes, "MT", "MD", "MTd", "MDd") then
table.insert(runtimes, "MT")
end
requireinfo.configs.runtimes = table.concat(runtimes, ",")
end
-- we need to ensure readonly configs
for _, name in ipairs(table.keys(requireinfo.configs)) do
Expand Down

0 comments on commit 2b7f8c1

Please sign in to comment.