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.
166 lines
8.6 KiB
166 lines
8.6 KiB
10 years ago
|
<%def name="get_repo_root()">..\..</%def>\
|
||
10 years ago
|
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
|
||
|
<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
|
||
10 years ago
|
<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], openssl_pkg_version = None, zlib_pkg_version = None)">\
|
||
10 years ago
|
% for project in vsprojects:
|
||
10 years ago
|
% 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">
|
||
10 years ago
|
% if openssl_pkg_version:
|
||
|
<Import Project="..\packages\openssl.${openssl_pkg_version}\build\native\openssl.props" Condition="Exists('..\packages\openssl.${openssl_pkg_version}\build\native\openssl.props')" />
|
||
|
% endif
|
||
10 years ago
|
<ItemGroup Label="ProjectConfigurations">
|
||
|
<ProjectConfiguration Include="Debug|Win32">
|
||
|
<Configuration>Debug</Configuration>
|
||
|
<Platform>Win32</Platform>
|
||
|
</ProjectConfiguration>
|
||
|
<ProjectConfiguration Include="Release|Win32">
|
||
|
<Configuration>Release</Configuration>
|
||
|
<Platform>Win32</Platform>
|
||
|
</ProjectConfiguration>
|
||
|
</ItemGroup>
|
||
|
<PropertyGroup Label="Globals">
|
||
10 years ago
|
<ProjectGuid>${project_guid if project_guid else project.vs_project_guid}</ProjectGuid>
|
||
10 years ago
|
</PropertyGroup>
|
||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||
10 years ago
|
<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>
|
||
10 years ago
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||
10 years ago
|
<ConfigurationType>${configuration_type}</ConfigurationType>
|
||
10 years ago
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||
|
<CharacterSet>Unicode</CharacterSet>
|
||
|
</PropertyGroup>
|
||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||
10 years ago
|
<ConfigurationType>${configuration_type}</ConfigurationType>
|
||
10 years ago
|
<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" />
|
||
10 years ago
|
<Import Project="..\global.props" />
|
||
10 years ago
|
% for prop in additional_props:
|
||
10 years ago
|
<Import Project="..\${prop}.props" />
|
||
10 years ago
|
% endfor
|
||
10 years ago
|
</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" />
|
||
10 years ago
|
<Import Project="..\global.props" />
|
||
10 years ago
|
% for prop in additional_props:
|
||
10 years ago
|
<Import Project="..\${prop}." />
|
||
10 years ago
|
% endfor
|
||
10 years ago
|
</ImportGroup>
|
||
|
<PropertyGroup Label="UserMacros" />
|
||
10 years ago
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||
|
<TargetName>${name}</TargetName>
|
||
|
</PropertyGroup>
|
||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||
|
<TargetName>${name}</TargetName>
|
||
|
</PropertyGroup>
|
||
10 years ago
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||
|
<ClCompile>
|
||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||
|
<WarningLevel>Level3</WarningLevel>
|
||
|
<Optimization>Disabled</Optimization>
|
||
10 years ago
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||
10 years ago
|
<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>
|
||
10 years ago
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||
10 years ago
|
<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:
|
||
10 years ago
|
<ClInclude Include="${get_repo_root()}\${to_windows_path(public_header)}" />
|
||
10 years ago
|
% endfor
|
||
|
</ItemGroup>
|
||
|
% endif
|
||
|
% if project.get('headers',[]):
|
||
|
<ItemGroup>
|
||
|
% for header in project.headers:
|
||
10 years ago
|
<ClInclude Include="${get_repo_root()}\${to_windows_path(header)}" />
|
||
10 years ago
|
% endfor
|
||
|
</ItemGroup>
|
||
|
% endif
|
||
|
% if project.get('src',[]):
|
||
|
<ItemGroup>
|
||
|
% for src_name in project.src:
|
||
10 years ago
|
<ClCompile Include="${get_repo_root()}\${to_windows_path(src_name)}">
|
||
10 years ago
|
</ClCompile>
|
||
|
% endfor
|
||
|
</ItemGroup>
|
||
|
% endif
|
||
|
% if project.get('deps',[]):
|
||
|
<ItemGroup>
|
||
|
% for dep in project.deps:
|
||
10 years ago
|
<ProjectReference Include="..\${dep}\${dep}.vcxproj">
|
||
10 years ago
|
<Project>${vsproject_dict[dep].vs_project_guid}</Project>
|
||
10 years ago
|
</ProjectReference>
|
||
|
% endfor
|
||
|
</ItemGroup>
|
||
|
% endif
|
||
10 years ago
|
%if zlib_pkg_version or openssl_pkg_version:
|
||
|
<ItemGroup>
|
||
|
<None Include="packages.config" />
|
||
|
</ItemGroup>
|
||
|
%endif
|
||
10 years ago
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||
|
<ImportGroup Label="ExtensionTargets">
|
||
10 years ago
|
%if zlib_pkg_version:
|
||
|
<Import Project="..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets" Condition="Exists('..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets')" />
|
||
|
<Import Project="..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets" Condition="Exists('..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets')" />
|
||
|
%endif
|
||
|
% if openssl_pkg_version:
|
||
|
<Import Project="..\packages\openssl.redist.${openssl_pkg_version}\build\native\openssl.redist.targets" Condition="Exists('..\packages\openssl.redist.${openssl_pkg_version}\build\native\openssl.redist.targets')" />
|
||
|
<Import Project="..\packages\openssl.${openssl_pkg_version}\build\native\openssl.targets" Condition="Exists('..\packages\openssl.${openssl_pkg_version}\build\native\openssl.targets')" />
|
||
|
% endif
|
||
10 years ago
|
</ImportGroup>
|
||
10 years ago
|
%if zlib_pkg_version or openssl_pkg_version:
|
||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||
|
<PropertyGroup>
|
||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||
|
</PropertyGroup>
|
||
|
%if zlib_pkg_version:
|
||
|
<Error Condition="!Exists('..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.redist.${zlib_pkg_version}\build\native\zlib.redist.targets'))" />
|
||
|
<Error Condition="!Exists('..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\zlib.${zlib_pkg_version}\build\native\zlib.targets'))" />
|
||
|
%endif
|
||
|
% if openssl_pkg_version:
|
||
|
<Error Condition="!Exists('..\packages\openssl.redist.${openssl_pkg_version}\build\native\openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\openssl.redist.${openssl_pkg_version}\build\native\openssl.redist.targets'))" />
|
||
|
<Error Condition="!Exists('..\packages\openssl.${openssl_pkg_version}\build\native\openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\openssl.${openssl_pkg_version}\build\native\openssl.props'))" />
|
||
|
<Error Condition="!Exists('..\packages\openssl.${openssl_pkg_version}\build\native\openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\openssl.${openssl_pkg_version}\build\native\openssl.targets'))" />
|
||
|
%endif
|
||
|
</Target>
|
||
|
%endif
|
||
10 years ago
|
</Project>
|
||
|
% endif
|
||
|
% endfor
|
||
|
</%def>\
|