SHADE_Y3/SHADE_CSharp/premake5.lua

66 lines
1.5 KiB
Lua

project "SHADE_CSharp"
architecture "x64"
kind "SharedLib"
language "C#"
clr "NetCore"
dotnetframework "net5.0"
namespace ("SHADE")
targetdir (outputdir)
objdir (interdir)
systemversion "latest"
files
{
"%{prj.location}/src/**.cs",
"%{prj.location}/src/**.tt"
}
flags
{
"MultiProcessorCompile"
}
dependson
{
"SHADE_Engine"
}
postbuildcommands
{
"xcopy /r /y /q \"%{wks.location}/bin/$(Configuration)\\net5.0\\SHADE_CSharp.pdb\" \"%{wks.location}/bin/$(Configuration)\""
}
warnings 'Extra'
filter "configurations:Debug"
symbols "On"
defines {"_DEBUG"}
filter "configurations:Release"
optimize "On"
defines{"_RELEASE"}
filter "configurations:Publish"
optimize "On"
defines{"_RELEASE"}
require "vstudio"
function platformsElementCS(cfg)
_p(2,'<Platforms>x64</Platforms>')
end
function configElementCS(cfg)
_p(2,'<Configurations>Debug;Release;Publish</Configurations>')
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)
return table.join(oldfn(cfg), {
-- platformsElementCS, configElementCS, docsElementCS, docsLocationElementCS,
platformsElementCS, configElementCS,
})
end)