-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_preload.lua
51 lines (45 loc) · 1.18 KB
/
_preload.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
--
-- Name: _preload.lua
-- Purpose: Define the premake action.
-- Author: Ryan Pusztai
-- Modified by: Andrea Zanellato
-- Andrew Gough
-- Manu Evans
-- Yehonatan Ballas
-- Jan "GamesTrap" Schürkamp
-- Created: 2013/05/06
-- Updated: 2023/12/08
-- Copyright: (c) 2008-2020 Jason Perkins and the Premake project
-- (c) 2022-2023 Jan "GamesTrap" Schürkamp
--
local p = premake
local defaultAction = ""
if os.target() == "windows" then
defaultAction = "vs"
else
defaultAction = "make"
end
newoption
{
trigger = "action",
description = "Specify for which action to generate a Visual Studio Code workspace for. Currently make (default on Linux), Visual Studio Solution (default on Windows) and ninja are supported",
allowed =
{
{ "make", "Make"},
{ "ninja", "Ninja"},
{ "vs", "Visual Studio Solution"}
},
default = defaultAction
}
newaction
{
trigger = "vscode",
shortname = "VSCode",
description = "Generate Visual Studio Code workspace",
onWorkspace = function(wks)
p.modules.vscode.generateWorkspace(wks)
end,
}
return function(cfg)
return (_ACTION == "vscode")
end