2016-11-16 20:49:01 +00:00
|
|
|
--
|
|
|
|
-- actions/vstudio/vs2017.lua
|
|
|
|
-- Extend the existing exporters with support for Visual Studio 2017.
|
|
|
|
-- Copyright (c) 2017-2017 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
local p = premake
|
|
|
|
local vstudio = p.vstudio
|
|
|
|
|
|
|
|
---
|
|
|
|
-- Define the Visual Studio 2017 export action.
|
|
|
|
---
|
|
|
|
|
|
|
|
newaction {
|
|
|
|
-- Metadata for the command line and help system
|
|
|
|
|
|
|
|
trigger = "vs2017",
|
|
|
|
shortname = "Visual Studio 2017",
|
|
|
|
description = "Generate Visual Studio 2017 project files",
|
|
|
|
|
|
|
|
-- Visual Studio always uses Windows path and naming conventions
|
|
|
|
|
2017-04-11 20:39:25 +00:00
|
|
|
targetos = "windows",
|
2016-11-16 20:49:01 +00:00
|
|
|
|
|
|
|
-- The capabilities of this action
|
|
|
|
|
|
|
|
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "Installer" },
|
2017-05-04 00:01:33 +00:00
|
|
|
valid_languages = { "C", "C++", "C#" },
|
2016-11-16 20:49:01 +00:00
|
|
|
valid_tools = {
|
|
|
|
cc = { "msc" },
|
|
|
|
dotnet = { "msnet" },
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Workspace and project generation logic
|
|
|
|
|
|
|
|
onWorkspace = function(wks)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.vs2005.generateSolution(wks)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
onProject = function(prj)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.vs2010.generateProject(prj)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
onRule = function(rule)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.vs2010.generateRule(rule)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
|
|
|
|
onCleanWorkspace = function(wks)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.cleanSolution(wks)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
onCleanProject = function(prj)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.cleanProject(prj)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
onCleanTarget = function(prj)
|
2017-06-19 19:50:34 +00:00
|
|
|
p.vstudio.cleanTarget(prj)
|
2016-11-16 20:49:01 +00:00
|
|
|
end,
|
|
|
|
|
2017-06-19 19:50:34 +00:00
|
|
|
pathVars = vstudio.vs2010.pathVars,
|
2016-11-16 20:49:01 +00:00
|
|
|
|
|
|
|
-- This stuff is specific to the Visual Studio exporters
|
|
|
|
|
|
|
|
vstudio = {
|
|
|
|
solutionVersion = "12",
|
|
|
|
versionName = "15",
|
|
|
|
targetFramework = "4.5.2",
|
|
|
|
toolsVersion = "15.0",
|
|
|
|
filterToolsVersion = "4.0",
|
|
|
|
platformToolset = "v141"
|
|
|
|
}
|
|
|
|
}
|