mirror of https://github.com/grpc/grpc.git
Merge pull request #40 from nicolasnoble/vsprojects
Factoring visual studio code into a buildgen plugin.pull/196/head
commit
e1175473fc
3 changed files with 45 additions and 45 deletions
@ -0,0 +1,38 @@ |
|||||||
|
"""Buildgen vsprojects plugin. |
||||||
|
|
||||||
|
This parses the list of libraries, and generates globals "vsprojects" |
||||||
|
and "vsproject_dict", to be used by the visual studio generators. |
||||||
|
|
||||||
|
""" |
||||||
|
|
||||||
|
|
||||||
|
def mako_plugin(dictionary): |
||||||
|
"""The exported plugin code for generate_vsprojeccts |
||||||
|
|
||||||
|
We want to help the work of the visual studio generators. |
||||||
|
|
||||||
|
""" |
||||||
|
|
||||||
|
libs = dictionary.get('libs', []) |
||||||
|
targets = dictionary.get('targets', []) |
||||||
|
|
||||||
|
for lib in libs: |
||||||
|
lib['is_library'] = True |
||||||
|
for target in targets: |
||||||
|
target['is_library'] = False |
||||||
|
|
||||||
|
projects = [] |
||||||
|
projects.extend(libs) |
||||||
|
projects.extend(targets) |
||||||
|
# Exclude projects without a visual project guid, such as the tests. |
||||||
|
projects = [project for project in projects |
||||||
|
if project.get('vs_project_guid', None)] |
||||||
|
|
||||||
|
# Exclude C++ projects for now |
||||||
|
projects = [project for project in projects |
||||||
|
if not project['language'] == 'c++'] |
||||||
|
|
||||||
|
project_dict = dict([(p['name'], p) for p in projects]) |
||||||
|
|
||||||
|
dictionary['vsprojects'] = projects |
||||||
|
dictionary['vsproject_dict'] = project_dict |
Loading…
Reference in new issue