aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/vsprojects/vcxproj_defs.include
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vsprojects/vcxproj_defs.include')
-rw-r--r--templates/vsprojects/vcxproj_defs.include204
1 files changed, 40 insertions, 164 deletions
diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include
index 0ddf68a11a..b57c27f76a 100644
--- a/templates/vsprojects/vcxproj_defs.include
+++ b/templates/vsprojects/vcxproj_defs.include
@@ -1,6 +1,35 @@
<%namespace file="packages.include" import="gen_package_props,gen_package_targets,gen_package_ensure"/>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
+<%def name="item_definition_group(project, target, debug, dll, _64bit)">\
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='${'%s%s|%s' % ('Debug' if debug else 'Release', '-DLL' if dll else '', 'x64' if _64bit else 'Win32')}'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>${'Disabled' if debug else 'MaxSpeed'}</Optimization>
+ <PreprocessorDefinitions>WIN32;${'_DEBUG' if debug else 'NDEBUG'};_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+% if not debug:
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+% endif
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>${'MultiThreadedDebug' if debug else 'MultiThreaded'}</RuntimeLibrary>
+ <TreatWarningAsError>${'false' if target.boringssl else 'true'}</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+## Silence D9007 warning. See #4508
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+% if not debug:
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+% endif
+ </Link>
+ </ItemDefinitionGroup>
+</%def>\
<%def name="gen_project(name, collection)">\
<%
target = None
@@ -33,7 +62,7 @@
props = sorted(list(set(props)))
packages = sorted(list(set(packages)))
dll = project.get('dll', False)
- repo_root = '..\..\..' + ('\..' if project.vs_proj_dir != '.' else '')
+ repo_root = '$(SolutionDir)\..'
%>\
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
@@ -141,169 +170,16 @@ ${gen_package_props(packages, repo_root)}\
% endfor
</PropertyGroup>
% endfor
- % if dll and dll != 'only':
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|Win32'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
-## Silence D9007 warning. See #4508
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|x64'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- % endif
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <SDLCheck>true</SDLCheck>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <TreatWarningAsError>true</TreatWarningAsError>
- <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
- <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
- </ClCompile>
- <Link>
- <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
- <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
- <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
+% if dll and dll != 'only':
+ ${item_definition_group(project, target, True, True, False)}
+ ${item_definition_group(project, target, True, True, True)}
+ ${item_definition_group(project, target, False, True, False)}
+ ${item_definition_group(project, target, False, True, True)}
+% endif
+ ${item_definition_group(project, target, True, False, False)}
+ ${item_definition_group(project, target, True, False, True)}
+ ${item_definition_group(project, target, False, False, False)}
+ ${item_definition_group(project, target, False, False, True)}
% if project.get('public_headers',[]):
<ItemGroup>
% for public_header in project.public_headers: