Skip to content

Commit

Permalink
Simplify premake5.lua by using default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Jan 10, 2024
1 parent b5b31cc commit fa61cec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions premake5.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
newoption {
trigger = "to",
value = "path",
description = "Set the output location for the generated files"
description = "Set the output location for the generated files",
default = "solution/%{_ACTION}/maxr"
}

if (_ACTION == nil) then
return
end

local locationDir = _OPTIONS["to"] or path.join("solution", _ACTION, "maxr")
local locationDir = _OPTIONS["to"]

local nugetPackages = {
"sdl2.nuget:2.28.0", "sdl2.nuget.redist:2.28.0",
Expand Down
5 changes: 3 additions & 2 deletions resinstaller/premake5.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
newoption {
trigger = "to",
value = "path",
description = "Set the output location for the generated files"
description = "Set the output location for the generated files",
default = "solution/%{_ACTION}/resinstaller"
}

if (_ACTION == nil) then
return
end

local locationDir = _OPTIONS["to"] or path.join("solution", _ACTION, "resinstaller")
local locationDir = _OPTIONS["to"]

local nugetPackages = {
"sdl2.nuget:2.26.5", "sdl2.nuget.redist:2.26.5",
Expand Down

0 comments on commit fa61cec

Please sign in to comment.