-
Notifications
You must be signed in to change notification settings - Fork 9
/
vscode.lua
54 lines (41 loc) · 1.39 KB
/
vscode.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--
-- Name: vscode.lua
-- Purpose: Define the vscode action(s).
-- Author: Ryan Pusztai
-- Modified by: Andrea Zanellato
-- Andrew Gough
-- Manu Evans
-- Jason Perkins
-- Yehonatan Ballas
-- Created: 2013/05/06
-- Copyright: (c) 2008-2020 Jason Perkins and the Premake project
--
local p = premake
p.modules.vscode = {}
p.modules.vscode._VERSION = p._VERSION
local vscode = p.modules.vscode
local project = p.project
function vscode.generateWorkspace(wks)
p.eol("\r\n")
p.indent(" ")
p.generate(wks, ".code-workspace", vscode.workspace.generate)
end
function vscode.generateProject(prj)
p.eol("\r\n")
p.indent(" ")
if project.isc(prj) or project.iscpp(prj) then
p.generate(prj, prj.location .. '/' .. prj.name .. "/.vscode/tasks.json", vscode.project.vscode_tasks)
p.generate(prj, prj.location .. '/' .. prj.name .. "/.vscode/launch.json", vscode.project.vscode_launch)
p.generate(prj, prj.location .. '/' .. prj.name .. "/.vscode/c_cpp_properties.json", vscode.project.vscode_c_cpp_properties)
end
end
function vscode.cleanWorkspace(wks)
p.clean.file(wks, wks.name .. ".code-workspace")
end
function vscode.cleanProject(prj)
p.clean.file(prj, prj.name .. ".vscode")
end
include("vscode_workspace.lua")
include("vscode_project.lua")
include("_preload.lua")
return vscode