2015-03-25 17:37:51 +00:00
|
|
|
--
|
|
|
|
-- 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
|
|
|
|
|
2015-07-14 16:31:06 +00:00
|
|
|
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility" },
|
2015-03-25 17:37:51 +00:00
|
|
|
valid_languages = { "C", "C++", "C#" },
|
|
|
|
valid_tools = {
|
|
|
|
cc = { "msc" },
|
|
|
|
dotnet = { "msnet" },
|
|
|
|
},
|
|
|
|
|
2015-08-12 18:53:12 +00:00
|
|
|
-- Workspace and project generation logic
|
2015-03-25 17:37:51 +00:00
|
|
|
|
2015-07-30 19:30:41 +00:00
|
|
|
onWorkspace = function(wks)
|
|
|
|
vstudio.vs2005.generateSolution(wks)
|
2015-04-09 05:58:30 +00:00
|
|
|
end,
|
|
|
|
onProject = function(prj)
|
|
|
|
vstudio.vs2010.generateProject(prj)
|
|
|
|
end,
|
2015-07-15 16:20:06 +00:00
|
|
|
onRule = function(rule)
|
|
|
|
vstudio.vs2010.generateRule(rule)
|
|
|
|
end,
|
2015-03-25 17:37:51 +00:00
|
|
|
|
2015-07-30 19:30:41 +00:00
|
|
|
onCleanWorkspace = function(wks)
|
|
|
|
vstudio.cleanSolution(wks)
|
2015-04-10 00:53:04 +00:00
|
|
|
end,
|
|
|
|
onCleanProject = function(prj)
|
|
|
|
vstudio.cleanProject(prj)
|
|
|
|
end,
|
|
|
|
onCleanTarget = function(prj)
|
|
|
|
vstudio.cleanTarget(prj)
|
|
|
|
end,
|
2015-03-25 17:37:51 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|