def VS_add_HeadFiles(program, elem, project_path): utils.source_ext = [] utils.source_ext = ["h"] for item in program: utils.walk_children(item) utils.source_list.sort() # print utils.source_list ItemGroup = SubElement(elem, 'ItemGroup') filter_h_ItemGroup = SubElement(filter_project, 'ItemGroup') for f in utils.source_list: path = _make_path_relative(project_path, f) File = SubElement(ItemGroup, 'ClInclude') if sys.version > '3': File.set('Include', path) else: # python3 is no decode function File.set('Include', path.decode(fs_encoding)) # add project.vcxproj.filter ClInclude = SubElement(filter_h_ItemGroup, 'ClInclude') if sys.version > '3': ClInclude.set('Include', path) else: # python3 is no decode function ClInclude.set('Include', path.decode(fs_encoding)) Filter = SubElement(ClInclude, 'Filter') Filter.text = 'Header Files'
def CLAddHeaderFiles(parent, program, project_path): utils.source_ext = [] utils.source_ext = ["h"] for item in program: utils.walk_children(item) utils.source_list.sort() for f in utils.source_list: path = _make_path_relative(project_path, f) CLAddFile(parent, path)
def CB_AddHeadFiles(program, elem, project_path): utils.source_ext = [] utils.source_ext = ["h"] for item in program: utils.walk_children(item) utils.source_list.sort() # print utils.source_list for f in utils.source_list: path = _make_path_relative(project_path, f) Unit = SubElement(elem, 'Unit') Unit.set('filename', path.decode(fs_encoding))
def VS_AddHeadFilesGroup(program, elem, project_path): utils.source_ext = [] utils.source_ext = ["h"] for item in program: utils.walk_children(item) utils.source_list.sort() # print utils.source_list for f in utils.source_list: path = _make_path_relative(project_path, f) File = SubElement(elem, 'File') File.set('RelativePath', path.decode(fs_encoding))
def VS_add_HeadFiles(program, elem, project_path): utils.source_ext = [] utils.source_ext = ["h"] for item in program: utils.walk_children(item) utils.source_list.sort() # print utils.source_list ItemGroup = SubElement(elem, 'ItemGroup') filter_h_ItemGroup = SubElement(filter_project, 'ItemGroup') for f in building.source_list: path = _make_path_relative(project_path, f) File = SubElement(ItemGroup, 'ClInclude') File.set('Include', path.decode(fs_encoding)) # add project.vcxproj.filter ClInclude = SubElement(filter_h_ItemGroup, 'ClInclude') ClInclude.set('Include', path.decode(fs_encoding)) Filter = SubElement(ClInclude, 'Filter') Filter.text='Header Files'