Adding VS 2015 support.
This commit is contained in:
parent
878d108367
commit
ad0e4f03b4
@ -80,6 +80,7 @@
|
|||||||
"actions/vstudio/vs2010_rules_xml.lua",
|
"actions/vstudio/vs2010_rules_xml.lua",
|
||||||
"actions/vstudio/vs2012.lua",
|
"actions/vstudio/vs2012.lua",
|
||||||
"actions/vstudio/vs2013.lua",
|
"actions/vstudio/vs2013.lua",
|
||||||
|
"actions/vstudio/vs2015.lua",
|
||||||
|
|
||||||
-- Clean action
|
-- Clean action
|
||||||
"actions/clean/_clean.lua",
|
"actions/clean/_clean.lua",
|
||||||
|
@ -1396,8 +1396,8 @@
|
|||||||
|
|
||||||
|
|
||||||
function m.platformToolset(cfg)
|
function m.platformToolset(cfg)
|
||||||
local map = { vs2012 = "v110", vs2013 = "v120" }
|
local action = premake.action.current()
|
||||||
local value = map[_ACTION]
|
local value = action.vstudio.platformToolset
|
||||||
if value then
|
if value then
|
||||||
-- should only be written if there is a C/C++ file in the config
|
-- should only be written if there is a C/C++ file in the config
|
||||||
for i = 1, #cfg.files do
|
for i = 1, #cfg.files do
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
versionName = "2012",
|
versionName = "2012",
|
||||||
targetFramework = "4.5",
|
targetFramework = "4.5",
|
||||||
toolsVersion = "4.0",
|
toolsVersion = "4.0",
|
||||||
|
platformToolset = "v110"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,5 +56,6 @@
|
|||||||
targetFramework = "4.5",
|
targetFramework = "4.5",
|
||||||
toolsVersion = "12.0",
|
toolsVersion = "12.0",
|
||||||
filterToolsVersion = "4.0",
|
filterToolsVersion = "4.0",
|
||||||
|
platformToolset = "v120"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
61
src/actions/vstudio/vs2015.lua
Normal file
61
src/actions/vstudio/vs2015.lua
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
--
|
||||||
|
-- actions/vstudio/vs2015.lua
|
||||||
|
-- Extend the existing exporters with support for Visual Studio 2015.
|
||||||
|
-- Copyright (c) 2015-2015 Jason Perkins and the Premake project
|
||||||
|
--
|
||||||
|
|
||||||
|
premake.vstudio.vc2015 = {}
|
||||||
|
|
||||||
|
local p = premake
|
||||||
|
local vstudio = p.vstudio
|
||||||
|
local vc2010 = vstudio.vc2010
|
||||||
|
|
||||||
|
local m = vstudio.vc2015
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Define the Visual Studio 2015 export action.
|
||||||
|
---
|
||||||
|
|
||||||
|
newaction {
|
||||||
|
-- Metadata for the command line and help system
|
||||||
|
|
||||||
|
trigger = "vs2015",
|
||||||
|
shortname = "Visual Studio 2015",
|
||||||
|
description = "Generate Visual Studio 2015 project files",
|
||||||
|
|
||||||
|
-- Visual Studio always uses Windows path and naming conventions
|
||||||
|
|
||||||
|
os = "windows",
|
||||||
|
|
||||||
|
-- The capabilities of this action
|
||||||
|
|
||||||
|
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None" },
|
||||||
|
valid_languages = { "C", "C++", "C#" },
|
||||||
|
valid_tools = {
|
||||||
|
cc = { "msc" },
|
||||||
|
dotnet = { "msnet" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Solution and project generation logic
|
||||||
|
|
||||||
|
onSolution = vstudio.vs2005.generateSolution,
|
||||||
|
onProject = vstudio.vs2010.generateProject,
|
||||||
|
|
||||||
|
onCleanSolution = vstudio.cleanSolution,
|
||||||
|
onCleanProject = vstudio.cleanProject,
|
||||||
|
onCleanTarget = vstudio.cleanTarget,
|
||||||
|
|
||||||
|
pathVars = vstudio.pathVars,
|
||||||
|
|
||||||
|
-- This stuff is specific to the Visual Studio exporters
|
||||||
|
|
||||||
|
vstudio = {
|
||||||
|
solutionVersion = "12",
|
||||||
|
versionName = "2015",
|
||||||
|
targetFramework = "4.5",
|
||||||
|
toolsVersion = "14.0",
|
||||||
|
filterToolsVersion = "4.0",
|
||||||
|
platformToolset = "v140"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user