-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
104 lines (83 loc) · 2.2 KB
/
premake5.lua
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
workspace "Cloud"
architecture "x64"
configurations
{
"Debug",
"Release",
"Distribution"
}
outputDir = "%{prj.name}/%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "CloudServer"
location "%{prj.name}"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" .. outputDir .. "/")
objdir ("bin-int/" .. outputDir .. "/")
pchheader "cloudpch.h"
pchsource "%{prj.location}/src/cloudpch.cpp"
files
{
"%{prj.location}/src/**.h",
"%{prj.location}/src/**.cpp",
"%{prj.location}/External/sqlite/sqlite3.c",
"%{prj.location}/External/SHA256/src/SHA256.cpp",
"%{prj.location}/External/DiffieHellman/dhexchange.c",
"%{prj.location}/External/AES/src/AES.cpp"
}
includedirs
{
"%{prj.location}/External/spdlog/include",
"%{prj.location}/External/sqlite",
"%{prj.location}/src",
"%{prj.location}/External/SHA256/include",
"%{prj.location}/External/DiffieHellman",
"%{prj.location}/External/AES/src"
}
filter "system:windows"
cppdialect "C++17"
staticruntime "On"
systemversion "latest"
defines "SV_WINDOWS"
filter "configurations:Debug"
defines "SV_DEBUG"
symbols "On"
filter "configurations:Release"
defines "SV_RELEASE"
optimize "On"
filter "configurations:Distribution"
defines "SV_DISTRIBUTION"
optimize "On"
--Filters the .c files and sets their precompiled header option to Not using precompiled headers
filter "files:**.c"
flags {"NoPCH"}
--The tokens do not work in the filter section so the relative path from the premake5.lua file to the SHA256 file should be hardcoded
filter "files:CloudServer/External/SHA256/src/**.cpp"
flags {"NOPCH"}
filter "files:CloudServer/External/AES/src/**.cpp"
flags {"NOPCH"}
project "CloudClient"
location "%{prj.name}"
language "C#"
kind "WindowedApp"
dotnetframework "netcoreapp3.1"
flags
{
"WPF"
}
targetdir ("bin/" .. outputDir .. "/")
objdir ("bin-int/" .. outputDir .. "/")
files
{
"%{prj.location}/Icons/*.png",
"%{prj.location}/*.cs",
"%{prj.location}/src/**.cs"
}
filter "configurations:Debug"
defines "CL_DEBUG"
symbols "On"
filter "configurations:Release"
defines "CL_RELEASE"
optimize "On"
filter "configurations:Distribution"
defines "CL_DISTRIBUTION"
optimize "On"