mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
212 lines
9.3 KiB
212 lines
9.3 KiB
<%namespace file="packages.include" import="gen_package_props,gen_package_targets,gen_package_ensure"/>\ |
|
<%def name="get_repo_root()">..\..</%def>\ |
|
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\ |
|
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\ |
|
<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], packages = [])">\ |
|
% for project in vsprojects: |
|
% if project.name == name: |
|
<?xml version="1.0" encoding="utf-8"?> |
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
${gen_package_props(packages)}\ |
|
<ItemGroup Label="ProjectConfigurations"> |
|
<ProjectConfiguration Include="Debug|Win32"> |
|
<Configuration>Debug</Configuration> |
|
<Platform>Win32</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="Release|x64"> |
|
<Configuration>Release</Configuration> |
|
<Platform>x64</Platform> |
|
</ProjectConfiguration> |
|
</ItemGroup> |
|
<PropertyGroup Label="Globals"> |
|
<ProjectGuid>${project_guid if project_guid else project.vs_project_guid}</ProjectGuid> |
|
</PropertyGroup> |
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
|
<PlatformToolset>v100</PlatformToolset> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
|
<PlatformToolset>v110</PlatformToolset> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
|
<PlatformToolset>v120</PlatformToolset> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
|
<ConfigurationType>${configuration_type}</ConfigurationType> |
|
<UseDebugLibraries>true</UseDebugLibraries> |
|
<CharacterSet>Unicode</CharacterSet> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
|
<ConfigurationType>${configuration_type}</ConfigurationType> |
|
<UseDebugLibraries>true</UseDebugLibraries> |
|
<CharacterSet>Unicode</CharacterSet> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
|
<ConfigurationType>${configuration_type}</ConfigurationType> |
|
<UseDebugLibraries>false</UseDebugLibraries> |
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
<CharacterSet>Unicode</CharacterSet> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
|
<ConfigurationType>${configuration_type}</ConfigurationType> |
|
<UseDebugLibraries>false</UseDebugLibraries> |
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
<CharacterSet>Unicode</CharacterSet> |
|
</PropertyGroup> |
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|
<ImportGroup Label="ExtensionSettings"> |
|
</ImportGroup> |
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
<Import Project="..\global.props" /> |
|
% for prop in additional_props: |
|
<Import Project="..\${prop}.props" /> |
|
% endfor |
|
</ImportGroup> |
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
<Import Project="..\global.props" /> |
|
% for prop in additional_props: |
|
<Import Project="..\${prop}.props" /> |
|
% endfor |
|
</ImportGroup> |
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
<Import Project="..\global.props" /> |
|
% for prop in additional_props: |
|
<Import Project="..\${prop}.props" /> |
|
% endfor |
|
</ImportGroup> |
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
<Import Project="..\global.props" /> |
|
% for prop in additional_props: |
|
<Import Project="..\${prop}.props" /> |
|
% endfor |
|
</ImportGroup> |
|
<PropertyGroup Label="UserMacros" /> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
<TargetName>${name}</TargetName> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
<TargetName>${name}</TargetName> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
<TargetName>${name}</TargetName> |
|
</PropertyGroup> |
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
<TargetName>${name}</TargetName> |
|
</PropertyGroup> |
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
<ClCompile> |
|
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
<WarningLevel>Level3</WarningLevel> |
|
<Optimization>Disabled</Optimization> |
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
<SDLCheck>true</SDLCheck> |
|
</ClCompile> |
|
<Link> |
|
<SubSystem>${get_subsystem(project.is_library)}</SubSystem> |
|
<GenerateDebugInformation>true</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> |
|
</ClCompile> |
|
<Link> |
|
<SubSystem>${get_subsystem(project.is_library)}</SubSystem> |
|
<GenerateDebugInformation>true</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;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
<SDLCheck>true</SDLCheck> |
|
</ClCompile> |
|
<Link> |
|
<SubSystem>${get_subsystem(project.is_library)}</SubSystem> |
|
<GenerateDebugInformation>true</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> |
|
</ClCompile> |
|
<Link> |
|
<SubSystem>${get_subsystem(project.is_library)}</SubSystem> |
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
<OptimizeReferences>true</OptimizeReferences> |
|
</Link> |
|
</ItemDefinitionGroup> |
|
% if project.get('public_headers',[]): |
|
<ItemGroup> |
|
% for public_header in project.public_headers: |
|
<ClInclude Include="${get_repo_root()}\${to_windows_path(public_header)}" /> |
|
% endfor |
|
</ItemGroup> |
|
% endif |
|
% if project.get('headers',[]): |
|
<ItemGroup> |
|
% for header in project.headers: |
|
<ClInclude Include="${get_repo_root()}\${to_windows_path(header)}" /> |
|
% endfor |
|
</ItemGroup> |
|
% endif |
|
% if project.get('src',[]): |
|
<ItemGroup> |
|
% for src_name in project.src: |
|
<ClCompile Include="${get_repo_root()}\${to_windows_path(src_name)}"> |
|
</ClCompile> |
|
% endfor |
|
</ItemGroup> |
|
% endif |
|
% if project.get('deps',[]): |
|
<ItemGroup> |
|
% for dep in project.deps: |
|
<ProjectReference Include="..\${dep}\${dep}.vcxproj"> |
|
<Project>${vsproject_dict[dep].vs_project_guid}</Project> |
|
</ProjectReference> |
|
% endfor |
|
</ItemGroup> |
|
% endif |
|
%if packages: |
|
<ItemGroup> |
|
<None Include="packages.config" /> |
|
</ItemGroup> |
|
%endif |
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|
<ImportGroup Label="ExtensionTargets"> |
|
${gen_package_targets(packages)}\ |
|
</ImportGroup> |
|
${gen_package_ensure(packages)}\ |
|
</Project> |
|
% endif |
|
% endfor |
|
</%def>\ |