aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/vsprojects
diff options
context:
space:
mode:
Diffstat (limited to 'templates/vsprojects')
-rw-r--r--templates/vsprojects/Grpc.mak.template13
-rw-r--r--templates/vsprojects/packages.include2
2 files changed, 9 insertions, 6 deletions
diff --git a/templates/vsprojects/Grpc.mak.template b/templates/vsprojects/Grpc.mak.template
index 2ad7fa3e8f..b761619d9b 100644
--- a/templates/vsprojects/Grpc.mak.template
+++ b/templates/vsprojects/Grpc.mak.template
@@ -29,13 +29,14 @@
<%!
import re
%>\
+<%namespace file="packages.include" import="get_openssl,get_zlib"/>\
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%
allowed_dependencies = set(['gpr', 'grpc', 'gpr_test_util', 'grpc_test_util'])
buildable_targets = [ target for target in targets
if set(target.deps).issubset(allowed_dependencies) and
- all([src.endswith('.c') for src in target.src]) and
- 'windows' in target.platforms ]
+ all([src.endswith('.c') for src in target.src]) and
+ 'windows' in target.platforms ]
c_test_targets = [ target for target in buildable_targets if target.build == 'test' and not target.language == 'c++' ]
cxx_test_targets = [ target for target in buildable_targets if target.build == 'test' and target.language == 'c++' ]
%>\
@@ -48,16 +49,16 @@ CC=cl.exe
LINK=link.exe
REPO_ROOT=..
-OPENSSL_INCLUDES = .\packages\openssl.1.0.2.1\build\native\include\v120\Win32\Debug\static
-ZLIB_INCLUDES = .\packages\zlib.1.2.8.7\build\native\include
+OPENSSL_INCLUDES = .\packages\${get_openssl()}\build\native\include\v120\Win32\Debug\static
+ZLIB_INCLUDES = .\packages\${get_zlib()}\build\native\include
INCLUDES=/I$(REPO_ROOT) /I$(REPO_ROOT)\include /I$(OPENSSL_INCLUDES) /I$(ZLIB_INCLUDES)
DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
-OPENSSL_LIBS=.\packages\openssl.1.0.2.1\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\openssl.1.0.2.1\build\native\lib\v120\Win32\Debug\static\libeay32.lib
+OPENSSL_LIBS=.\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\ssleay32.lib .\packages\${get_openssl()}\build\native\lib\v120\Win32\Debug\static\libeay32.lib
WINSOCK_LIBS=ws2_32.lib
-ZLIB_LIBS=.\packages\zlib.1.2.8.7\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib
+ZLIB_LIBS=.\packages\${get_zlib()}\build\native\lib\v120\Win32\Debug\static\cdecl\zlib.lib
LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
gpr_test_util:
diff --git a/templates/vsprojects/packages.include b/templates/vsprojects/packages.include
index 4ebd0a5a5b..2eba362179 100644
--- a/templates/vsprojects/packages.include
+++ b/templates/vsprojects/packages.include
@@ -4,6 +4,8 @@
zlib_pkg_name = "grpc.dependencies.zlib"
zlib_pkg_version = "1.2.8.9"
%>\
+<%def name="get_openssl()">${openssl_pkg_name}.${openssl_pkg_version}</%def>\
+<%def name="get_zlib()">${zlib_pkg_name}.${zlib_pkg_version}</%def>\
<%def name="gen_packages_config(packages)">\
<?xml version="1.0" encoding="utf-8"?>
<packages>