Skip to content

Commit

Permalink
Merge pull request jimon#36 from LostbBlizzard/makelikegmake2
Browse files Browse the repository at this point in the history
fixed defaultplatform not being selected when set
  • Loading branch information
Jarod42 authored Oct 26, 2024
2 parents 6c1dfe1 + e5131a5 commit f493d66
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ninja.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,22 @@ function ninja.generateWorkspace(wks)
table.insert(cfgs[cfg.buildcfg], key)

-- set first configuration name
if (cfg_first == nil) and (cfg.kind == p.CONSOLEAPP or cfg.kind == p.WINDOWEDAPP) then
cfg_first = key
if wks.defaultplatform == nil then
if (cfg_first == nil) and (cfg.kind == p.CONSOLEAPP or cfg.kind == p.WINDOWEDAPP) then
cfg_first = key
end
end
if (cfg_first_lib == nil) and (cfg.kind == p.STATICLIB or cfg.kind == p.SHAREDLIB) then
cfg_first_lib = key
end
if prj.name == wks.startproject then
cfg_first = key
if wks.defaultplatform == nil then
cfg_first = key
elseif cfg.platform == wks.defaultplatform then
if cfg_first == nil then
cfg_first = key
end
end
end

-- include other ninja file
Expand Down

0 comments on commit f493d66

Please sign in to comment.