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

fixed defaultplatform not being selected when set #36

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
fixed wks.defaultplatform being nil and not ""
LostbBlizzard committed Oct 26, 2024
commit e5131a5bb1848f490e9282fa76f99de8bb5918de
4 changes: 2 additions & 2 deletions ninja.lua
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ function ninja.generateWorkspace(wks)
table.insert(cfgs[cfg.buildcfg], key)

-- set first configuration name
if wks.defaultplatform == "" then
if wks.defaultplatform == nil then
if (cfg_first == nil) and (cfg.kind == p.CONSOLEAPP or cfg.kind == p.WINDOWEDAPP) then
cfg_first = key
end
@@ -169,7 +169,7 @@ function ninja.generateWorkspace(wks)
cfg_first_lib = key
end
if prj.name == wks.startproject then
if wks.defaultplatform == "" then
if wks.defaultplatform == nil then
cfg_first = key
elseif cfg.platform == wks.defaultplatform then
if cfg_first == nil then