From be7d8a2e4c3e41def238c2651bc17580c040323f Mon Sep 17 00:00:00 2001 From: Tom van Dijck Date: Wed, 16 Nov 2016 12:49:01 -0800 Subject: [PATCH] Add 'vs2017' target. --- src/_manifest.lua | 1 + src/actions/vstudio/vs2017.lua | 74 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 src/actions/vstudio/vs2017.lua diff --git a/src/_manifest.lua b/src/_manifest.lua index 986b6f95..77d69fa9 100644 --- a/src/_manifest.lua +++ b/src/_manifest.lua @@ -86,6 +86,7 @@ "actions/vstudio/vs2012.lua", "actions/vstudio/vs2013.lua", "actions/vstudio/vs2015.lua", + "actions/vstudio/vs2017.lua", -- Clean action "actions/clean/_clean.lua", diff --git a/src/actions/vstudio/vs2017.lua b/src/actions/vstudio/vs2017.lua new file mode 100644 index 00000000..0d5617c3 --- /dev/null +++ b/src/actions/vstudio/vs2017.lua @@ -0,0 +1,74 @@ +-- +-- actions/vstudio/vs2017.lua +-- Extend the existing exporters with support for Visual Studio 2017. +-- Copyright (c) 2017-2017 Jason Perkins and the Premake project +-- + + premake.vstudio.vc2017 = {} + + local p = premake + local vstudio = p.vstudio + local vc2010 = vstudio.vc2010 + + local m = vstudio.vc2017 + + +--- +-- 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 + + os = "windows", + + -- The capabilities of this action + + valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "Installer" }, + valid_languages = { "C", "C++", "C#" }, + valid_tools = { + cc = { "msc" }, + dotnet = { "msnet" }, + }, + + -- Workspace and project generation logic + + onWorkspace = function(wks) + vstudio.vs2005.generateSolution(wks) + end, + onProject = function(prj) + vstudio.vs2010.generateProject(prj) + end, + onRule = function(rule) + vstudio.vs2010.generateRule(rule) + end, + + onCleanWorkspace = function(wks) + vstudio.cleanSolution(wks) + end, + onCleanProject = function(prj) + vstudio.cleanProject(prj) + end, + onCleanTarget = function(prj) + vstudio.cleanTarget(prj) + end, + + pathVars = vstudio.pathVars, + + -- 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" + } + }