aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/vsprojects/generate_debug_projects.sh6
-rw-r--r--templates/vsprojects/gpr/gpr.vcxproj.filters.template2
-rw-r--r--templates/vsprojects/gpr/gpr.vcxproj.template2
-rw-r--r--templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc++/grpc++.vcxproj.filters.template2
-rw-r--r--templates/vsprojects/grpc++/grpc++.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.filters.template2
-rw-r--r--templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc/grpc.vcxproj.filters.template2
-rw-r--r--templates/vsprojects/grpc/grpc.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template2
-rw-r--r--templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template2
-rw-r--r--templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template2
-rw-r--r--templates/vsprojects/vcxproj.filters_defs.include2
-rw-r--r--templates/vsprojects/vcxproj_defs.include40
16 files changed, 49 insertions, 25 deletions
diff --git a/templates/vsprojects/generate_debug_projects.sh b/templates/vsprojects/generate_debug_projects.sh
new file mode 100755
index 0000000000..d432a231e3
--- /dev/null
+++ b/templates/vsprojects/generate_debug_projects.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd `dirname $0`/../..
+
+git diff | grep \\+Project | cut -d\" -f 4 | sort -u | grep _test$ | while read p ; do mkdir -p templates/vsprojects/$p ; echo '<%namespace file="../vcxproj_defs.include" import="gen_project"/>${gen_project("'$p'", targets)}' > templates/vsprojects/$p/$p.vcxproj.template ; done
+git diff | grep \\+Project | cut -d\" -f 4 | sort -u | grep -v _test$ | while read p ; do mkdir -p templates/vsprojects/$p ; echo '<%namespace file="../vcxproj_defs.include" import="gen_project"/>${gen_project("'$p'", libs)}' > templates/vsprojects/$p/$p.vcxproj.template ; done
diff --git a/templates/vsprojects/gpr/gpr.vcxproj.filters.template b/templates/vsprojects/gpr/gpr.vcxproj.filters.template
index 1aeb3b1dd0..779a36bf0f 100644
--- a/templates/vsprojects/gpr/gpr.vcxproj.filters.template
+++ b/templates/vsprojects/gpr/gpr.vcxproj.filters.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
-${gen_filters('gpr', libs, targets)}
+${gen_filters('gpr', libs)}
diff --git a/templates/vsprojects/gpr/gpr.vcxproj.template b/templates/vsprojects/gpr/gpr.vcxproj.template
index b94266c776..ca217c2762 100644
--- a/templates/vsprojects/gpr/gpr.vcxproj.template
+++ b/templates/vsprojects/gpr/gpr.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('gpr', libs, targets)}
+${gen_project('gpr', libs)}
diff --git a/templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template b/templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template
index 42f4a248b8..d412d646e7 100644
--- a/templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template
+++ b/templates/vsprojects/gpr_test_util/gpr_test_util.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('gpr_test_util', libs, targets)} \ No newline at end of file
+${gen_project('gpr_test_util', libs)} \ No newline at end of file
diff --git a/templates/vsprojects/grpc++/grpc++.vcxproj.filters.template b/templates/vsprojects/grpc++/grpc++.vcxproj.filters.template
index 818eb87c75..70e0a6c13b 100644
--- a/templates/vsprojects/grpc++/grpc++.vcxproj.filters.template
+++ b/templates/vsprojects/grpc++/grpc++.vcxproj.filters.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
-${gen_filters('grpc++', libs, targets)}
+${gen_filters('grpc++', libs)}
diff --git a/templates/vsprojects/grpc++/grpc++.vcxproj.template b/templates/vsprojects/grpc++/grpc++.vcxproj.template
index fb84a1a801..5f13591b2d 100644
--- a/templates/vsprojects/grpc++/grpc++.vcxproj.template
+++ b/templates/vsprojects/grpc++/grpc++.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc++', libs, targets)} \ No newline at end of file
+${gen_project('grpc++', libs)} \ No newline at end of file
diff --git a/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.filters.template b/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.filters.template
new file mode 100644
index 0000000000..465a3d76f5
--- /dev/null
+++ b/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.filters.template
@@ -0,0 +1,2 @@
+<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
+${gen_filters('grpc++_unsecure', libs)}
diff --git a/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.template b/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.template
new file mode 100644
index 0000000000..62016ccc0a
--- /dev/null
+++ b/templates/vsprojects/grpc++_unsecure/grpc++.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc++_unsecure', libs)} \ No newline at end of file
diff --git a/templates/vsprojects/grpc/grpc.vcxproj.filters.template b/templates/vsprojects/grpc/grpc.vcxproj.filters.template
index a9575e935a..9607d23324 100644
--- a/templates/vsprojects/grpc/grpc.vcxproj.filters.template
+++ b/templates/vsprojects/grpc/grpc.vcxproj.filters.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
-${gen_filters('grpc', libs, targets)}
+${gen_filters('grpc', libs)}
diff --git a/templates/vsprojects/grpc/grpc.vcxproj.template b/templates/vsprojects/grpc/grpc.vcxproj.template
index 35ac30380e..a19214e0a4 100644
--- a/templates/vsprojects/grpc/grpc.vcxproj.template
+++ b/templates/vsprojects/grpc/grpc.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc', libs, targets, packages=['openssl','zlib'])} \ No newline at end of file
+${gen_project('grpc', libs, packages=['openssl','zlib'])} \ No newline at end of file
diff --git a/templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template b/templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template
index c1f23011b2..8a5f1ca5b7 100644
--- a/templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template
+++ b/templates/vsprojects/grpc_csharp_ext/grpc_csharp_ext.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', additional_props = ['winsock'], packages=['openssl','zlib'])}
+${gen_project('grpc_csharp_ext', libs, configuration_type = 'DynamicLibrary', props = ['winsock'], packages=['openssl','zlib'])}
diff --git a/templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template b/templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template
index 4dd335505a..3781023837 100644
--- a/templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template
+++ b/templates/vsprojects/grpc_test_util/grpc_test_util.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc_test_util', libs, targets)} \ No newline at end of file
+${gen_project('grpc_test_util', libs)} \ No newline at end of file
diff --git a/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template b/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template
index a0c26df73b..aef6465915 100644
--- a/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template
+++ b/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj.filters_defs.include" import="gen_filters"/>\
-${gen_filters('grpc_unsecure', libs, targets)}
+${gen_filters('grpc_unsecure', libs)}
diff --git a/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template b/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template
index 93b343eb45..fd827d191a 100644
--- a/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template
+++ b/templates/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.template
@@ -1,2 +1,2 @@
<%namespace file="../vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc_unsecure', libs, targets, packages=['zlib'])} \ No newline at end of file
+${gen_project('grpc_unsecure', libs, packages=['zlib'])} \ No newline at end of file
diff --git a/templates/vsprojects/vcxproj.filters_defs.include b/templates/vsprojects/vcxproj.filters_defs.include
index 646b17e9fe..787d66eeff 100644
--- a/templates/vsprojects/vcxproj.filters_defs.include
+++ b/templates/vsprojects/vcxproj.filters_defs.include
@@ -9,7 +9,7 @@
<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
<%def name="to_filter(path)">${calc_to_filter(path)}</%def>\
<%def name="filter_to_guid(proj, filter)">${re.sub('(........)(....)(....)(....)', r'\1-\2-\3-\4-', hashlib.md5(''.join([filter, proj])).hexdigest())}</%def>\
-<%def name="gen_filters(name, libs, targets)">\
+<%def name="gen_filters(name, collection)">\
% for project in vsprojects:
% if project.name == name:
<?xml version="1.0" encoding="utf-8"?>
diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include
index af215d6a2a..628074c75f 100644
--- a/templates/vsprojects/vcxproj_defs.include
+++ b/templates/vsprojects/vcxproj_defs.include
@@ -2,9 +2,24 @@
<%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:
+<%def name="gen_project(name, collection, configuration_type = None, project_guid = None, props = [], packages = [])">\
+<%
+ for p in vsprojects:
+ if p.name == name:
+ project = p
+ for t in collection:
+ if t.name == name:
+ target = t
+ if not configuration_type:
+ configuration_type = 'StaticLibrary'
+ if not project_guid:
+ project_guid = project.vs_project_guid
+ if configuration_type == 'Application':
+ props.extend(['winsock', 'protobuf', 'zlib', 'openssl'])
+ if target.language == 'c++':
+ props.extend(['protobuf'])
+ props.extend(['global'])
+%>\
<?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)}\
@@ -66,29 +81,25 @@ ${gen_package_props(packages)}\
</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:
+ % for prop in 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:
+ % for prop in 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:
+ % for prop in 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:
+ % for prop in props:
<Import Project="..\${prop}.props" />
% endfor
</ImportGroup>
@@ -186,6 +197,11 @@ ${gen_package_props(packages)}\
</ClCompile>
% endfor
</ItemGroup>
+ % elif configuration_type != 'StaticLibrary':
+ <ItemGroup>
+ <ClCompile Include="${get_repo_root()}\${to_windows_path('vsprojects/dummy.c')}">
+ </ClCompile>
+ </ItemGroup>
% endif
% if project.get('deps',[]):
<ItemGroup>
@@ -207,6 +223,4 @@ ${gen_package_targets(packages)}\
</ImportGroup>
${gen_package_ensure(packages)}\
</Project>
- % endif
-% endfor
</%def>\ \ No newline at end of file