Skip to content

Commit

Permalink
Adding VS 2015 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdijck committed Mar 31, 2015
1 parent 878d108 commit ad0e4f0
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/_manifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"actions/vstudio/vs2010_rules_xml.lua",
"actions/vstudio/vs2012.lua",
"actions/vstudio/vs2013.lua",
"actions/vstudio/vs2015.lua",

-- Clean action
"actions/clean/_clean.lua",
Expand Down
4 changes: 2 additions & 2 deletions src/actions/vstudio/vs2010_vcxproj.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1396,8 +1396,8 @@


function m.platformToolset(cfg)
local map = { vs2012 = "v110", vs2013 = "v120" }
local value = map[_ACTION]
local action = premake.action.current()
local value = action.vstudio.platformToolset
if value then
-- should only be written if there is a C/C++ file in the config
for i = 1, #cfg.files do
Expand Down
1 change: 1 addition & 0 deletions src/actions/vstudio/vs2012.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
versionName = "2012",
targetFramework = "4.5",
toolsVersion = "4.0",
platformToolset = "v110"
}
}

1 change: 1 addition & 0 deletions src/actions/vstudio/vs2013.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
targetFramework = "4.5",
toolsVersion = "12.0",
filterToolsVersion = "4.0",
platformToolset = "v120"
}
}
61 changes: 61 additions & 0 deletions src/actions/vstudio/vs2015.lua
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit ad0e4f0

Please sign in to comment.