<%namespace file="packages.include" import="gen_package_props,gen_package_targets,gen_package_ensure"/>\ <%def name="get_repo_root()">..\..\ <%def name="to_windows_path(path)">${path.replace('/','\\')}\ <%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}\ <%def name="gen_project(name, collection, configuration_type = None, project_guid = None, props = [], packages = [])">\ <% target = None for p in vsprojects: if p.name == name: project = p for t in collection: if t.name == name: target = t if not configuration_type and target: print target.name if target.build == 'test' or target.build == 'tool': configuration_type = 'Application' if not configuration_type: configuration_type = 'StaticLibrary' if not project_guid: project_guid = project.vs_project_guid if target.build == 'test' and target.language == 'c++': props.extend(['cpptest']) if configuration_type == 'Application': if target.build == 'protoc': props.extend(['protoc']) else: props.extend(['winsock', 'protobuf', 'zlib', 'openssl']) else: props.extend(['winsock']) props.extend(['global']) dll = project.get('dll', 'no') %>\ ${gen_package_props(packages)}\ % if dll == 'yes': Debug-DLL Win32 Debug-DLL x64 Release-DLL Win32 Release-DLL x64 % endif Debug Win32 Debug x64 Release Win32 Release x64 ${project_guid if project_guid else project.vs_project_guid} v100 v110 v120 ${configuration_type} true Unicode ${configuration_type} false true Unicode % if dll == 'yes': ${configuration_type} true Unicode ${configuration_type} false true Unicode % endif % for prop in props: % endfor ${name} % if "zlib" in packages: static Debug % endif % if "openssl" in packages: Debug % endif ${name} % if "zlib" in packages: static Debug % endif % if "openssl" in packages: Debug % endif % if dll == 'yes': NotUsing Level3 Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true MultiThreadedDebug ${get_subsystem(project.is_library)} true NotUsing Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDebug ${get_subsystem(project.is_library)} true Level3 NotUsing MaxSpeed true true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true MultiThreaded ${get_subsystem(project.is_library)} true true true Level3 NotUsing MaxSpeed true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreaded ${get_subsystem(project.is_library)} true true true % endif NotUsing Level3 Disabled WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true MultiThreadedDebug ${get_subsystem(project.is_library)} true NotUsing Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDebug ${get_subsystem(project.is_library)} true Level3 NotUsing MaxSpeed true true WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) true MultiThreaded ${get_subsystem(project.is_library)} true true true Level3 NotUsing MaxSpeed true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreaded ${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: % if src_name.endswith(".proto"): <% src_name_parts = src_name.split(".") %>\ % else: % endif % endfor % elif configuration_type != 'StaticLibrary': % endif % if project.get('deps',[]): % for dep in project.deps: ${vsproject_dict[dep].vs_project_guid} % endfor % endif %if packages: %endif ${gen_package_targets(packages)}\ ${gen_package_ensure(packages)}\ \