-
Notifications
You must be signed in to change notification settings - Fork 5
/
msbuild.props
239 lines (213 loc) · 9.62 KB
/
msbuild.props
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Common MSBuild instructions -->
<!-- Definition of a new-line for messages -->
<PropertyGroup>
<NL>%0A</NL>
</PropertyGroup>
<!-- Type of project, depending on project name -->
<PropertyGroup Condition="'$(ProjectName)'==''">
<ProjectName>$(MSBuildProjectName)</ProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(ProjectDir)'==''">
<ProjectDir>$(MSBuildProjectDirectory)\</ProjectDir>
</PropertyGroup>
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(ProjectName), '^kbd.*')) and
Exists('$(ProjectDir)$(ProjectName).c') and
Exists('$(ProjectDir)strings.h')">
<ProjectType>KeyboardLayout</ProjectType>
</PropertyGroup>
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(ProjectName), '^lib.*'))">
<ProjectType>Library</ProjectType>
</PropertyGroup>
<PropertyGroup Condition="'$(ProjectType)'==''">
<ProjectType>ConsoleTool</ProjectType>
</PropertyGroup>
<!-- Configuration for 3 platforms -->
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|arm64">
<Configuration>Release</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|arm64">
<Configuration>Debug</Configuration>
<Platform>arm64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<!-- Type target, depending on project type -->
<PropertyGroup Label="Configuration" Condition="'$(ProjectType)'=='KeyboardLayout'">
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(ProjectType)'=='Library'">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(ProjectType)'=='ConsoleTool'">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<!-- Standard default properties -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<!-- Default environment -->
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<RootNamespace>$(ProjectName)</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<PlatformToolset>v143</PlatformToolset>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<Platform Condition="'$(Platform)' == ''">arm64</Platform>
</PropertyGroup>
<!-- Input and output directories -->
<PropertyGroup Condition="'$(RootDir)'==''">
<RootDir>$(SolutionDir)</RootDir>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<PlatformDir Condition="'$(Platform)'!='Win32'">$(Platform)</PlatformDir>
<PlatformDir Condition="'$(Platform)'=='Win32'">x86</PlatformDir>
<OutDir>$(SolutionDir)$(PlatformDir)\$(Configuration)\</OutDir>
<IntDir>$(OutDir)$(ProjectName)\</IntDir>
<ResourceDir>$(RootDir)keyboards\</ResourceDir>
<ToolsDir>$(RootDir)tools\</ToolsDir>
</PropertyGroup>
<!-- Build options -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<!-- Standard build options -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition="Exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label="LocalAppDataPlatform"/>
</ImportGroup>
<!-- Build options -->
<PropertyGroup>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<LanguageStandard>stdcpp20</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ResourceDir);$(OutDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<Link>
<EnableUAC>false</EnableUAC>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(ProjectType)'!='KeyboardLayout'">
<ClCompile>
<SDLCheck>true</SDLCheck>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(ProjectType)'=='KeyboardLayout'">
<ClCompile>
<DebugInformationFormat>None</DebugInformationFormat>
<ProgramDataBaseFileName/>
<CompileAsManaged>false</CompileAsManaged>
<ExceptionHandling>false</ExceptionHandling>
<FunctionLevelLinking>false</FunctionLevelLinking>
<BufferSecurityCheck>false</BufferSecurityCheck>
<SDLCheck>false</SDLCheck>
<WholeProgramOptimization>false</WholeProgramOptimization>
<ControlFlowGuard>false</ControlFlowGuard>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
<AdditionalOptions>%(AdditionalOptions) -merge:.rdata=.data -merge:.bss=.data /ignore:4254</AdditionalOptions>
<NoEntryPoint>true</NoEntryPoint>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile/>
</Link>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(ProjectType)'=='KeyboardLayout'">
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(ProjectType)'=='ConsoleTool'">
<Link>
<SubSystem>Console</SubSystem>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>libtools.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Source files for keyboard layouts -->
<ItemGroup Condition="'$(ProjectType)'=='KeyboardLayout'">
<ClCompile Include="$(ProjectName).c"/>
<ClInclude Include="strings.h"/>
<ResourceCompile Include="$(ResourceDir)kbd.rc"/>
</ItemGroup>
<ItemDefinitionGroup Condition="'$(ProjectType)'=='KeyboardLayout'">
<ResourceCompile>
<PreprocessorDefinitions>WKL_PROJECT_NAME=$(ProjectName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<!-- One main source file per console application -->
<ItemGroup Condition="'$(ProjectType)'=='ConsoleTool'">
<ClCompile Include="$(ProjectName).cpp"/>
</ItemGroup>
<!-- A target to build unicode_syms.h -->
<Target Name="BuildUnicodeSyms" Inputs="$(ResourceDir)unicode.h" Outputs="$(OutDir)include\unicode_syms.h">
<Message Text="Building $(OutDir)include\unicode_syms.h" Importance="high"/>
<MakeDir Directories="$(OutDir)include" Condition="!Exists('$(OutDir)include')"/>
<Exec ConsoleToMSBuild='true'
Command='python "$(ToolsDir)build-unicode-header.py" "$(ResourceDir)unicode.h" "$(OutDir)include\unicode_syms.h"'>
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec"/>
</Exec>
</Target>
<!-- Standard targets -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<!-- Print a message before each build -->
<Target Name="DisplayHeader" BeforeTargets='PrepareForBuild'>
<Message Text="$(NL)$(NL)========= Building project $(ProjectName), type: $(ProjectType), for $(Platform), $(Configuration) =========$(NL)$(NL)" Importance="high"/>
</Target>
</Project>