2013-08-15 11:16:56 +00:00
|
|
|
--
|
2017-08-30 18:35:42 +00:00
|
|
|
-- vs2013.lua
|
2013-08-17 18:31:52 +00:00
|
|
|
-- Extend the existing exporters with support for Visual Studio 2013.
|
2017-08-30 18:35:42 +00:00
|
|
|
-- Copyright (c) Jason Perkins and the Premake project
|
2013-08-15 11:16:56 +00:00
|
|
|
--
|
|
|
|
|
2014-05-22 14:26:16 +00:00
|
|
|
local p = premake
|
|
|
|
local vstudio = p.vstudio
|
2013-08-15 11:16:56 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
-- Define the Visual Studio 2013 export action.
|
|
|
|
---
|
|
|
|
|
|
|
|
newaction {
|
|
|
|
-- Metadata for the command line and help system
|
|
|
|
|
|
|
|
trigger = "vs2013",
|
|
|
|
shortname = "Visual Studio 2013",
|
|
|
|
description = "Generate Visual Studio 2013 project files",
|
|
|
|
|
|
|
|
-- Visual Studio always uses Windows path and naming conventions
|
|
|
|
|
2017-04-11 20:39:25 +00:00
|
|
|
targetos = "windows",
|
2017-05-02 17:21:11 +00:00
|
|
|
toolset = "msc-v120",
|
2013-08-15 11:16:56 +00:00
|
|
|
|
|
|
|
-- The capabilities of this action
|
|
|
|
|
2019-08-08 14:16:11 +00:00
|
|
|
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib", "Makefile", "None", "Utility", "SharedItems" },
|
2017-08-30 18:35:42 +00:00
|
|
|
valid_languages = { "C", "C++", "C#", "F#" },
|
2013-08-15 11:16:56 +00:00
|
|
|
valid_tools = {
|
|
|
|
cc = { "msc" },
|
|
|
|
dotnet = { "msnet" },
|
|
|
|
},
|
|
|
|
|
2015-08-12 18:53:12 +00:00
|
|
|
-- Workspace and project generation logic
|
2013-08-15 11:16:56 +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,
|
2013-08-15 11:16:56 +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,
|
2013-08-15 11:16:56 +00:00
|
|
|
|
2017-06-19 19:50:34 +00:00
|
|
|
pathVars = vstudio.vs2010.pathVars,
|
2015-01-15 17:00:57 +00:00
|
|
|
|
2013-08-15 11:16:56 +00:00
|
|
|
-- This stuff is specific to the Visual Studio exporters
|
|
|
|
|
|
|
|
vstudio = {
|
|
|
|
solutionVersion = "12",
|
2013-10-29 05:47:39 +00:00
|
|
|
versionName = "2013",
|
2013-08-15 11:16:56 +00:00
|
|
|
targetFramework = "4.5",
|
|
|
|
toolsVersion = "12.0",
|
2015-01-12 22:17:56 +00:00
|
|
|
filterToolsVersion = "4.0",
|
2013-08-15 11:16:56 +00:00
|
|
|
}
|
|
|
|
}
|