-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcsgame.lua
More file actions
52 lines (47 loc) · 1.61 KB
/
csgame.lua
File metadata and controls
52 lines (47 loc) · 1.61 KB
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
52
require('vstudio')
premake.override(premake.vstudio.dotnetbase, "projectProperties", function(base, prj)
if string.find(prj.filename, 'csgame') then
premake.w(' <PropertyGroup>')
premake.w(' <ImplicitUsings>enable</ImplicitUsings>')
premake.w(' <Nullable>enable</Nullable>')
premake.w(' <PublishTrimmed>true</PublishTrimmed>')
premake.w(' <PublishRelease>true</PublishRelease>')
premake.w(' <AllowUnsafeBlocks>true</AllowUnsafeBlocks>')
premake.w(' <Platforms>x86;x64</Platforms>')
-- premake.w(' <PublishAot>true</PublishAot>')
premake.w(' </PropertyGroup>')
premake.w(' <ItemGroup>')
premake.w(' <ContentWithTargetPath Include="../build/bin/x86_64_$(Configuration)/*.dll">')
premake.w(' <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>')
premake.w(' <TargetPath>%%(Filename)%%(Extension)</TargetPath>')
premake.w(' </ContentWithTargetPath>')
premake.w(' </ItemGroup>')
end
base(prj)
end)
function csgame()
language "c#"
kind "WindowedApp"
dotnetframework "net8.0"
files { "csgame/**.cs" }
disablewarnings { "CS8625", "CS8600", "CS8604" } -- disable some warnings in imgui.net
end
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. tostring(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
if included ~= true then
workspace "csgame"
configurations { "Debug", "Release" }
location "build"
project "csgame_standalone"
csgame()
end