From 1de3a5c0a19d6fef9c6443ff735a54691b6157c9 Mon Sep 17 00:00:00 2001 From: jtattermusch Date: Fri, 12 Dec 2014 15:02:32 -0800 Subject: [PATCH] Add Visual Studio project for building zlib. Change on 2014/12/12 by jtattermusch ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82017498 --- templates/vsprojects/vs2013/grpc.sln.template | 45 ++-- .../vsprojects/vs2013/vcxproj_defs.include | 7 +- vsprojects/vs2013/gpr.vcxproj | 6 +- vsprojects/vs2013/grpc.sln | 53 +++-- vsprojects/vs2013/grpc.vcxproj | 6 +- vsprojects/vs2013/grpc_test_util.vcxproj | 6 +- vsprojects/vs2013/third_party/zlibvc.vcxproj | 192 ++++++++++++++++++ 7 files changed, 262 insertions(+), 53 deletions(-) create mode 100644 vsprojects/vs2013/third_party/zlibvc.vcxproj diff --git a/templates/vsprojects/vs2013/grpc.sln.template b/templates/vsprojects/vs2013/grpc.sln.template index 2eba4cbe03f..fa32f1c52e2 100644 --- a/templates/vsprojects/vs2013/grpc.sln.template +++ b/templates/vsprojects/vs2013/grpc.sln.template @@ -1,5 +1,7 @@ ## Template for Visual Studio solution ## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx +## NOTE: tabs in this file are needed by Visual Studio to correctly interpret +## the file. Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 @@ -31,28 +33,39 @@ project_dict = dict([(p.name, p) for p in projects]) % for project in projects: Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}" % if project.deps: - ProjectSection(ProjectDependencies) = postProject + ProjectSection(ProjectDependencies) = postProject % for dep in project.deps: - ${project_dict[dep].vs_project_guid} = ${project_dict[dep].vs_project_guid} + ${project_dict[dep].vs_project_guid} = ${project_dict[dep].vs_project_guid} % endfor - EndProjectSection + EndProjectSection % endif EndProject % endfor +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "third_party", "third_party", "{DD51818F-0BCA-4035-9E5B-F28A9F87DED4}" +EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution % for project in projects: - ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 - ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 - ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 - ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 + ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 + ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 + ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 + ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 % endfor - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {DD51818F-0BCA-4035-9E5B-F28A9F87DED4} + EndGlobalSection EndGlobal diff --git a/templates/vsprojects/vs2013/vcxproj_defs.include b/templates/vsprojects/vs2013/vcxproj_defs.include index fea86ddf361..35c493f6869 100644 --- a/templates/vsprojects/vs2013/vcxproj_defs.include +++ b/templates/vsprojects/vs2013/vcxproj_defs.include @@ -1,6 +1,7 @@ <%def name="to_windows_path(path)">${path.replace('/','\\')}\ <%def name="get_configuration_type(is_library)">${'StaticLibrary' if is_library else 'Application'}\ <%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}\ +<%def name="include_directories()">$(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories)\ <%def name="gen_project(name, libs, targets)">\ <% ## TODO(jtattermusch): this code is c&p from the solution template @@ -38,8 +39,6 @@ project_dict = dict([(p.name, p) for p in projects]) ${project.vs_project_guid} - Win32Proj - @@ -75,7 +74,7 @@ project_dict = dict([(p.name, p) for p in projects]) Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + ${include_directories()} ${get_subsystem(project.is_library)} @@ -91,7 +90,7 @@ project_dict = dict([(p.name, p) for p in projects]) true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + ${include_directories()} ${get_subsystem(project.is_library)} diff --git a/vsprojects/vs2013/gpr.vcxproj b/vsprojects/vs2013/gpr.vcxproj index a7b07c21a32..47b034c0e2c 100644 --- a/vsprojects/vs2013/gpr.vcxproj +++ b/vsprojects/vs2013/gpr.vcxproj @@ -12,8 +12,6 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - Win32Proj - @@ -49,7 +47,7 @@ Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows @@ -65,7 +63,7 @@ true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows diff --git a/vsprojects/vs2013/grpc.sln b/vsprojects/vs2013/grpc.sln index 475ea9abde2..d777dcc6bdc 100644 --- a/vsprojects/vs2013/grpc.sln +++ b/vsprojects/vs2013/grpc.sln @@ -9,26 +9,37 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "grpc.vcxproj", "{29 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "third_party", "third_party", "{DD51818F-0BCA-4035-9E5B-F28A9F87DED4}" +EndProject Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32 - {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 + {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {DD51818F-0BCA-4035-9E5B-F28A9F87DED4} + EndGlobalSection EndGlobal diff --git a/vsprojects/vs2013/grpc.vcxproj b/vsprojects/vs2013/grpc.vcxproj index c01322bc9c2..b421320bf75 100644 --- a/vsprojects/vs2013/grpc.vcxproj +++ b/vsprojects/vs2013/grpc.vcxproj @@ -12,8 +12,6 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} - Win32Proj - @@ -49,7 +47,7 @@ Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows @@ -65,7 +63,7 @@ true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows diff --git a/vsprojects/vs2013/grpc_test_util.vcxproj b/vsprojects/vs2013/grpc_test_util.vcxproj index fa6f5b07ae1..3077fd51c99 100644 --- a/vsprojects/vs2013/grpc_test_util.vcxproj +++ b/vsprojects/vs2013/grpc_test_util.vcxproj @@ -12,8 +12,6 @@ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - Win32Proj - @@ -49,7 +47,7 @@ Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows @@ -65,7 +63,7 @@ true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true - $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;%(AdditionalIncludeDirectories) Windows diff --git a/vsprojects/vs2013/third_party/zlibvc.vcxproj b/vsprojects/vs2013/third_party/zlibvc.vcxproj new file mode 100644 index 00000000000..dc81fba58c8 --- /dev/null +++ b/vsprojects/vs2013/third_party/zlibvc.vcxproj @@ -0,0 +1,192 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8FD826F8-3739-44E6-8CC8-997122E53B8D} + + + + StaticLibrary + false + true + v120 + + + StaticLibrary + false + v120 + Unicode + + + + + + + + + + + + + true + false + false + false + zlibwapi + zlibwapi + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + Disabled + ..\..\..\third_party\zlib;..\..\..\third_party\zlib\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + + + MultiThreadedDebugDLL + false + $(IntDir)zlibvc.pch + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 /SAFESEH:NO %(AdditionalOptions) + ..\..\..\third_party\zlib\contrib\masmx86\match686.obj;..\..\..\third_party\zlib\contrib\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + .\zlibvc.def + true + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\..\third_party\zlib\contrib\masmx86 + bld_ml32.bat + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + $(OutDir)zlibvc.tlb + + + OnlyExplicitInline + ..\..\..\third_party\zlib;..\..\..\third_party\zlib\contrib\masmx86;%(AdditionalIncludeDirectories) + WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + $(IntDir)zlibvc.pch + All + $(IntDir) + $(IntDir) + $(OutDir) + + + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x040c + + + /MACHINE:I386 %(AdditionalOptions) + ..\..\..\third_party\zlib\contrib\masmx86\match686.obj;..\..\..\third_party\zlib\contrib\masmx86\inffas32.obj;%(AdditionalDependencies) + $(OutDir)zlibwapi.dll + true + false + .\zlibvc.def + $(OutDir)zlibwapi.pdb + true + $(OutDir)zlibwapi.map + Windows + false + + + $(OutDir)zlibwapi.lib + + + cd ..\..\..\third_party\zlib\contrib\masmx86 + bld_ml32.bat + + + + + + + + + + + + + + + + + + + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + +