-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSolutionItems.lua
More file actions
24 lines (20 loc) · 871 Bytes
/
SolutionItems.lua
File metadata and controls
24 lines (20 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- Implement the solution_items command for solution-scope files
require('vstudio')
premake.api.register {
name = "solution_items",
scope = "workspace",
kind = "list:string",
}
premake.override(premake.vstudio.sln2005, "projects", function(base, wks)
if wks.solution_items and #wks.solution_items > 0 then
local solution_folder_GUID = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}" -- See https://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs
premake.push("Project(\"" .. solution_folder_GUID .. "\") = \"Solution Items\", \"Solution Items\", \"{" .. os.uuid("Solution Items:" .. wks.name) .. "}\"")
premake.push("ProjectSection(SolutionItems) = preProject")
for _, path in ipairs(wks.solution_items) do
premake.w(path .. " = " .. path)
end
premake.pop("EndProjectSection")
premake.pop("EndProject")
end
base(wks)
end)