OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 | 3 |
4 import os.path | 4 import os.path |
5 import re | 5 import re |
6 import subprocess | 6 import subprocess |
7 import sys | 7 import sys |
8 import gyp.common | 8 import gyp.common |
9 import gyp.MSVSNew as MSVSNew | 9 import gyp.MSVSNew as MSVSNew |
10 import gyp.MSVSToolFile as MSVSToolFile | 10 import gyp.MSVSToolFile as MSVSToolFile |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 guid = default_config.get('msvs_guid') | 149 guid = default_config.get('msvs_guid') |
150 if guid: guid = '{%s}' % guid | 150 if guid: guid = '{%s}' % guid |
151 p.Create(spec['target_name'], guid=guid) | 151 p.Create(spec['target_name'], guid=guid) |
152 | 152 |
153 # Get directory project file is in. | 153 # Get directory project file is in. |
154 gyp_dir = os.path.split(vcproj_filename)[0] | 154 gyp_dir = os.path.split(vcproj_filename)[0] |
155 | 155 |
156 # Pick target configuration type. | 156 # Pick target configuration type. |
157 config_type = { | 157 config_type = { |
158 'executable': '1', | 158 'executable': '1', |
159 'application': '1', | |
160 'shared_library': '2', | 159 'shared_library': '2', |
161 'static_library': '4', | 160 'static_library': '4', |
162 'none': '10', | 161 'none': '10', |
163 }[spec['type']] | 162 }[spec['type']] |
164 | 163 |
165 for config_name, c in spec['configurations'].iteritems(): | 164 for config_name, c in spec['configurations'].iteritems(): |
166 # Process each configuration. | 165 # Process each configuration. |
167 vsprops_dirs = c.get('msvs_props', []) | 166 vsprops_dirs = c.get('msvs_props', []) |
168 vsprops_dirs = [_FixPath(i) for i in vsprops_dirs] | 167 vsprops_dirs = [_FixPath(i) for i in vsprops_dirs] |
169 | 168 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 for p in sln_projects] | 487 for p in sln_projects] |
489 dep_entries = [_ProjectObject(sln_path, p, project_objs, projects) | 488 dep_entries = [_ProjectObject(sln_path, p, project_objs, projects) |
490 for p in dep_projects] | 489 for p in dep_projects] |
491 entries.append(MSVSNew.MSVSFolder('dependencies', entries=dep_entries)) | 490 entries.append(MSVSNew.MSVSFolder('dependencies', entries=dep_entries)) |
492 # Create solution. | 491 # Create solution. |
493 sln = MSVSNew.MSVSSolution(sln_path, | 492 sln = MSVSNew.MSVSSolution(sln_path, |
494 entries=entries, | 493 entries=entries, |
495 variants=configs, | 494 variants=configs, |
496 websiteProperties=False) | 495 websiteProperties=False) |
497 sln.Write() | 496 sln.Write() |
OLD | NEW |