Add code generation on compiling to premake scripts using custom build commands

This commit is contained in:
Jan
2019-10-25 02:13:37 +02:00
parent d93b4f5fac
commit 034de70bbc
27 changed files with 345 additions and 325 deletions

View File

@ -5,25 +5,32 @@ function ZoneCodeGenerator:include()
end
function ZoneCodeGenerator:link()
links {
"ZoneCodeGenerator"
}
links "ZoneCodeGenerator"
end
function ZoneCodeGenerator:use()
dependson "ZoneCodeGenerator"
end
function ZoneCodeGenerator:project()
local folder = ProjectFolder();
project "ZoneCodeGenerator"
targetdir(TargetDirectoryBin)
targetdir(TargetDirectoryLib)
location "%{wks.location}/src/%{prj.name}"
kind "ConsoleApp"
language "C#"
namespace "ZoneCodeGenerator"
files {
path.join(folder, "ZoneCodeGenerator/**.cs")
path.join(folder, "ZoneCodeGenerator/**.cs"),
path.join(folder, "ZoneCodeGenerator/**.stg")
}
filter "files:**.stg"
buildaction "Embed"
filter {}
vpaths { ["*"] = "src/ZoneCodeGenerator" }
nuget {