-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDirectory.Build.props
82 lines (68 loc) · 3.28 KB
/
Directory.Build.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
<!--
***********************************
Directory.Build.props
Added at the beginning of the build process
MSBuild root configurations
***********************************
-->
<Project>
<!-- Include projects' root name -->
<Import Project="$(MSBuildThisFileDirectory)config\msbuild\ProjectRootName.props" />
<!-- Include Assembly Version and Product Info -->
<Import Project="$(MSBuildThisFileDirectory)config\msbuild\VersionInfo.props" />
<!-- Include preprocessor definitions for the product version targeting C/C++ -->
<Import Project="$(MSBuildThisFileDirectory)config\msbuild\VersionInfoPreprocessorDefinitions.props" />
<!-- Set default configuration -->
<PropertyGroup Condition=" '$(Configuration)' == '' ">
<!-- Assume 'Release' if no configuration is specified -->
<Configuration>Release</Configuration>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineDebug>true</DefineDebug>
</PropertyGroup>
<!-- Set default platform -->
<PropertyGroup Condition=" '$(Platform)' == '' ">
<Platform>x64</Platform>
</PropertyGroup>
<PropertyGroup>
<CustomIntermediateFolderName>__intermediates__\</CustomIntermediateFolderName>
<CustomOutputFolderName>__output__\</CustomOutputFolderName>
<CustomPublishFolderName>dist\</CustomPublishFolderName>
</PropertyGroup>
<PropertyGroup>
<!-- Output path schema -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<!-- Output paths parents -->
<PropertyGroup>
<!-- Root represents the parent path for all output,
and Main is a sub directory that has the distributable output -not demos or tests for example- -->
<OutDirRoot>$(MSBuildThisFileDirectory)$(CustomOutputFolderName)</OutDirRoot>
<OutDirMain>$(OutDirRoot)$(Configuration)\$(ProjectRootName)\$(Platform)\</OutDirMain>
</PropertyGroup>
<!-- Build paths -->
<PropertyGroup>
<!-- IntDir is the property for the C/C++ projects -->
<IntDir>$(MSBuildThisFileDirectory)$(CustomIntermediateFolderName)$(MSBuildProjectName)\$(Configuration)\$(Platform)\</IntDir>
<BaseIntermediateOutputPath>$(IntDir)</BaseIntermediateOutputPath>
<!-- anything not in 'src' is considered helper #NOTE: not best practice! to have code outside 'src' imho -->
<!-- OutDir is the property for the C/C++ projects -->
<OutDir>$(OutDirRoot)$(Configuration)\Helpers\$(MSBuildProjectName)\$(Platform)\</OutDir>
<OutputPath>$(OutDir)</OutputPath>
</PropertyGroup>
<!-- Consolidate all main executables in one output -->
<PropertyGroup Condition="$(MSBuildProjectDirectory.Contains('src'))">
<!-- OutDir is the property for the C/C++ projects -->
<OutDir>$(OutDirMain)</OutDir>
<OutputPath>$(OutDir)</OutputPath>
</PropertyGroup>
<!-- Publish path, set IsPublishable to false to exclude project from being published -->
<PropertyGroup>
<PublishDir>$(MSBuildThisFileDirectory)$(CustomPublishFolderName)$(Version)\$(Configuration)\$(ProjectRootName)\$(Platform)\</PublishDir>
</PropertyGroup>
<!-- For code file names and pdb -->
<PropertyGroup>
<PathMap>$(MSBuildProjectDirectory)=$(MSBuildProjectName)</PathMap>
</PropertyGroup>
</Project>