<%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="gen_project(name, libs, targets)">\ <% ## TODO(jtattermusch): this code is c&p from the solution template for lib in libs: lib.is_library = True for target in targets: target.is_library = False projects = [] projects.extend(libs) projects.extend(targets) 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.get('c++', False)] for p in projects: p.deps = p.get('deps',[]) project_dict = dict([(p.name, p) for p in projects]) %>\ % for project in projects: % if project.name == name: Debug Win32 Release Win32 ${project.vs_project_guid} ${get_configuration_type(project.is_library)} true v120 Unicode $(Configuration)\$(ProjectName)\ ${get_configuration_type(project.is_library)} false v120 true Unicode $(Configuration)\$(ProjectName)\ NotUsing Level3 Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true ${get_subsystem(project.is_library)} true Level3 NotUsing MaxSpeed true true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true ${get_subsystem(project.is_library)} true true true % if project.get('public_headers',[]): % for public_header in project.public_headers: % endfor % endif % if project.get('headers',[]): % for header in project.headers: % endfor % endif % if project.get('src',[]): % for src_name in project.src: % endfor % endif % if project.get('deps',[]): % for dep in project.deps: ${project_dict[dep].vs_project_guid} % endfor % endif % endif % endfor \