-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpremake5.lua
114 lines (87 loc) · 3.03 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
105
106
107
108
109
110
111
112
workspace "IOptimize"
configurations {"Debug", "Release"}
architecture "x86_64"
function defaultBuildCfg()
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
runtime "Debug"
optimize "Debug"
filter "configurations:Release"
defines { "NDEBUG" }
symbols "Off"
runtime "Release"
optimize "Speed"
end
function defaultBuildLocation()
targetdir ("bin/%{prj.name}/%{cfg.buildcfg}")
objdir ("bin-int/%{prj.name}/%{cfg.buildcfg}")
end
startproject "IOptimizeWpfFrontend"
project "IOptimizeWpfFrontend"
targetname "WPFFrontend"
location "wpfFrontend/"
language "C#"
flags { "WPF" }
kind "ConsoleApp"
files {
"**.xaml",
"**.xaml.cs",
"%{prj.location}/Properties/Resources.Designer.cs",
"**.cs",
"**.config",
"**.settings",
"**.resx",
"**.manifest"
}
links {
"Microsoft.Csharp",
"PresentationCore",
"PresentationFramework",
"System",
"System.Core",
"System.Data",
"System.Data.DataSetExtensions",
"System.Xaml",
"System.Xml",
"System.Xml.Linq",
"WindowsBase",
"IOptimize",
}
defaultBuildLocation()
defaultBuildCfg()
project "IOptimizeTest"
location "test"
kind "ConsoleApp"
language "C"
cdialect "C17"
files {"%{prj.location}/**.c", "%{prj.location}/**.h"}
includedirs { "src", "%{prj.location}" }
links { "User32", "Advapi32", "Cfgmgr32", "Setupapi", "PowrProf", "Ntdll", "IOptimize", "Kernel32" }
defaultBuildLocation()
defaultBuildCfg()
project "IOptimize"
location "src"
kind "SharedLib"
language "C"
cdialect "C17"
files {
"%{prj.location}/**.c",
"%{prj.location}/**.h",
}
removefiles {
"**.g.cs",
"**.g.i.cs",
".NETFramework,Version=v4.7.2.AssemblyAttributes.cs",
".NETFramework,Version=v4.8.0.AssemblyAttributes.cs",
}
includedirs { "src" }
links { "User32", "Advapi32", "Cfgmgr32", "Setupapi", "PowrProf", "Ntdll", "Kernel32" }
postbuildcommands { "copy ..\\bin\\%{prj.name}\\%{cfg.buildcfg}\\IOptimize.dll ..\\bin\\IOptimizeWpfFrontend\\%{cfg.buildcfg}" }
postbuildcommands { "copy ..\\bin\\%{prj.name}\\%{cfg.buildcfg}\\IOptimize.dll ..\\bin\\IOptimizeTest\\%{cfg.buildcfg}" }
defines { "IOPTIMIZE_EXPORT_DLL" }
targetname "IOptimize"
defaultBuildLocation()
filter "configurations:Debug"
debuggertype "Mixed"
defaultBuildCfg()