Skip to content

Commit

Permalink
- Added vstudio.targetPlatform to premake4
Browse files Browse the repository at this point in the history
- Updated premake4 windows binaries
- Updated .editorconfig to maintain premake4's lua convention
  • Loading branch information
iarwain committed Apr 26, 2020
1 parent 63c0c95 commit c2bf329
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ indent_size = 4
[*.sh]
indent_size = 4
end_of_line = lf

[*.lua]
indent_style = tab
indent_size = 4
end_of_line = lf
Binary file modified premake/bin/windows/premake4.exe
Binary file not shown.
1 change: 1 addition & 0 deletions premake/src/actions/vstudio/_vstudio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@
productVersion = "8.0.30703",
solutionVersion = "11",
targetFramework = "4.0",
targetPlatform = "10.0.17763.0",
toolsVersion = "4.0",
}
}
15 changes: 8 additions & 7 deletions premake/src/actions/vstudio/vs2010_vcxproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
premake.vstudio.vc2010 = { }
local vc2010 = premake.vstudio.vc2010
local vstudio = premake.vstudio
local action = premake.action.current()


local function vs2010_config(prj)
Expand All @@ -22,6 +21,7 @@
end

local function vs2010_globals(prj)
local action = premake.action.current()
_p(1,'<PropertyGroup Label="Globals">')
_p(2,'<ProjectGuid>{%s}</ProjectGuid>',prj.uuid)
_p(2,'<RootNamespace>%s</RootNamespace>',prj.name)
Expand All @@ -32,6 +32,7 @@
_p(2,'<Keyword>ManagedCProj</Keyword>')
else
_p(2,'<Keyword>Win32Proj</Keyword>')
_p(2,'<WindowsTargetPlatformVersion>%s</WindowsTargetPlatformVersion>', action.vstudio.targetPlatform)
end
_p(1,'</PropertyGroup>')
end
Expand Down Expand Up @@ -158,7 +159,7 @@
end

local function precompiled_header(cfg)
if not cfg.flags.NoPCH and cfg.pchheader then
if not cfg.flags.NoPCH and cfg.pchheader then
_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')
_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)
else
Expand Down Expand Up @@ -230,7 +231,7 @@
end

local function floating_point(cfg)
if cfg.flags.FloatFast then
if cfg.flags.FloatFast then
_p(3,'<FloatingPointModel>Fast</FloatingPointModel>')
elseif cfg.flags.FloatStrict and not cfg.flags.Managed then
_p(3,'<FloatingPointModel>Strict</FloatingPointModel>')
Expand Down Expand Up @@ -335,19 +336,19 @@

local function event_hooks(cfg)
if #cfg.postbuildcommands> 0 then
_p(2,'<PostBuildEvent>')
_p(2,'<PostBuildEvent>')
_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.postbuildcommands, "", "", "\r\n")))
_p(2,'</PostBuildEvent>')
end

if #cfg.prebuildcommands> 0 then
_p(2,'<PreBuildEvent>')
_p(2,'<PreBuildEvent>')
_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prebuildcommands, "", "", "\r\n")))
_p(2,'</PreBuildEvent>')
end

if #cfg.prelinkcommands> 0 then
_p(2,'<PreLinkEvent>')
_p(2,'<PreLinkEvent>')
_p(3,'<Command>%s</Command>',premake.esc(table.implode(cfg.prelinkcommands, "", "", "\r\n")))
_p(2,'</PreLinkEvent>')
end
Expand All @@ -368,7 +369,7 @@
end

local function item_def_lib(cfg)
-- The Xbox360 project files are stored in another place in the project file.
-- The Xbox360 project files are stored in another place in the project file.
if cfg.kind == 'StaticLib' and cfg.platform ~= "Xbox360" then
_p(1,'<Lib>')
_p(2,'<OutputFile>$(OutDir)%s</OutputFile>',cfg.buildtarget.name)
Expand Down
1 change: 1 addition & 0 deletions premake/src/actions/vstudio/vs2012.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
vstudio = {
solutionVersion = "12",
targetFramework = "4.5",
targetPlatform = "",
toolsVersion = "4.0",
}
}
Expand Down
3 changes: 2 additions & 1 deletion premake/src/actions/vstudio/vs2013.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
premake.vstudio.vc2013 = {}
local vc2013 = premake.vstudio.vc2013
local vstudio = premake.vstudio


---
-- Register a command-line action for Visual Studio 2013.
Expand Down Expand Up @@ -52,6 +52,7 @@
vstudio = {
solutionVersion = "12",
targetFramework = "4.5",
targetPlatform = "",
toolsVersion = "12.0",
}
}
1 change: 1 addition & 0 deletions premake/src/actions/vstudio/vs2015.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
vstudio = {
solutionVersion = "12",
targetFramework = "4.5.2",
targetPlatform = "10.0.17763.0",
toolsVersion = "14.0",
}
}
1 change: 1 addition & 0 deletions premake/src/actions/vstudio/vs2017.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
vstudio = {
solutionVersion = "12",
targetFramework = "4.5.2",
targetPlatform = "10.0.17763.0",
toolsVersion = "15.0",
}
}
1 change: 1 addition & 0 deletions premake/src/actions/vstudio/vs2019.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
vstudio = {
solutionVersion = "12",
targetFramework = "4.7.2",
targetPlatform = "10.0.17763.0",
toolsVersion = "16.0",
}
}
50 changes: 25 additions & 25 deletions premake/src/host/scripts.c

Large diffs are not rendered by default.

0 comments on commit c2bf329

Please sign in to comment.