Documentation files are now generated for projects

This commit is contained in:
Kah Wei 2022-11-14 18:35:52 +08:00
parent 77cab3e4c5
commit 5ccd2263c7
4 changed files with 33 additions and 5 deletions

View File

@ -75,7 +75,8 @@ project "SHADE_Application"
"26439", "26439",
"26451", "26451",
"26437", "26437",
"4275" "4275",
"4635"
} }
linkoptions { "-IGNORE:4006" } linkoptions { "-IGNORE:4006" }

View File

@ -27,6 +27,13 @@ project "SHADE_CSharp"
warnings 'Extra' warnings 'Extra'
postbuildcommands
{
"xcopy /r /y /q \"%{outputdir}\\net5.0\\SHADE_CSharp.xml\" \"%{outputdir}\"",
"xcopy /r /y /q \"%{outputdir}\\net5.0\\SHADE_CSharp.pdb\" \"%{outputdir}\"",
"rmdir /s /q \"%{outputdir}\\net5.0\""
}
filter "configurations:Debug" filter "configurations:Debug"
symbols "On" symbols "On"
defines {"_DEBUG"} defines {"_DEBUG"}
@ -41,12 +48,18 @@ project "SHADE_CSharp"
require "vstudio" require "vstudio"
function platformsElement(cfg) function platformsElementCS(cfg)
_p(2,'<Platforms>x64</Platforms>') _p(2,'<Platforms>x64</Platforms>')
end end
function docsElementCS(cfg)
_p(2,'<GenerateDocumentationFile>true</GenerateDocumentationFile>')
end
function docsLocationElementCS(cfg)
_p(2,'<DocumentationFile>$(OutDir)</DocumentationFile>')
end
premake.override(premake.vstudio.cs2005.elements, "projectProperties", function (oldfn, cfg) premake.override(premake.vstudio.cs2005.elements, "projectProperties", function (oldfn, cfg)
return table.join(oldfn(cfg), { return table.join(oldfn(cfg), {
platformsElement, platformsElementCS, docsElementCS, docsLocationElementCS,
}) })
end) end)

View File

@ -78,7 +78,8 @@ project "SHADE_Engine"
"26439", "26439",
"26451", "26451",
"26437", "26437",
"4275" "4275",
"4635"
} }
linkoptions { "-IGNORE:4006" } linkoptions { "-IGNORE:4006" }

View File

@ -75,7 +75,8 @@ project "SHADE_Managed"
disablewarnings disablewarnings
{ {
"4275" "4275",
"4635"
} }
@ -102,3 +103,15 @@ project "SHADE_Managed"
optimize "On" optimize "On"
defines{"_RELEASE"} defines{"_RELEASE"}
links{"librttr_core.lib"} links{"librttr_core.lib"}
require "vstudio"
function docsElementCPP(cfg)
_p(3,'<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>')
end
premake.override(premake.vstudio.vc2010.elements, "clCompile", function (oldfn, cfg)
return table.join(oldfn(cfg), {
docsElementCPP,
})
end)