| OLD | NEW |
| 1 # Copyright (c) 2014 Google Inc. All rights reserved. | 1 # Copyright (c) 2014 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Xcode-ninja wrapper project file generator. | 5 """Xcode-ninja wrapper project file generator. |
| 6 | 6 |
| 7 This updates the data structures passed to the Xcode gyp generator to build | 7 This updates the data structures passed to the Xcode gyp generator to build |
| 8 with ninja instead. The Xcode project itself is transformed into a list of | 8 with ninja instead. The Xcode project itself is transformed into a list of |
| 9 executable targets, each with a build step to build with ninja, and a target | 9 executable targets, each with a build step to build with ninja, and a target |
| 10 with every source and resource file. This appears to sidestep some of the | 10 with every source and resource file. This appears to sidestep some of the |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if 'IPHONEOS_DEPLOYMENT_TARGET' in old_xcode_settings: | 85 if 'IPHONEOS_DEPLOYMENT_TARGET' in old_xcode_settings: |
| 86 new_xcode_settings['CODE_SIGNING_REQUIRED'] = "NO" | 86 new_xcode_settings['CODE_SIGNING_REQUIRED'] = "NO" |
| 87 new_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] = \ | 87 new_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] = \ |
| 88 old_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] | 88 old_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] |
| 89 ninja_target['configurations'][config] = {} | 89 ninja_target['configurations'][config] = {} |
| 90 ninja_target['configurations'][config]['xcode_settings'] = \ | 90 ninja_target['configurations'][config]['xcode_settings'] = \ |
| 91 new_xcode_settings | 91 new_xcode_settings |
| 92 | 92 |
| 93 ninja_target['mac_bundle'] = old_spec.get('mac_bundle', 0) | 93 ninja_target['mac_bundle'] = old_spec.get('mac_bundle', 0) |
| 94 ninja_target['ios_app_extension'] = old_spec.get('ios_app_extension', 0) | 94 ninja_target['ios_app_extension'] = old_spec.get('ios_app_extension', 0) |
| 95 ninja_target['ios_watchkit_extension'] = \ |
| 96 old_spec.get('ios_watchkit_extension', 0) |
| 97 ninja_target['ios_watchkit_app'] = old_spec.get('ios_watchkit_app', 0) |
| 95 ninja_target['type'] = old_spec['type'] | 98 ninja_target['type'] = old_spec['type'] |
| 96 if ninja_toplevel: | 99 if ninja_toplevel: |
| 97 ninja_target['actions'] = [ | 100 ninja_target['actions'] = [ |
| 98 { | 101 { |
| 99 'action_name': 'Compile and copy %s via ninja' % target_name, | 102 'action_name': 'Compile and copy %s via ninja' % target_name, |
| 100 'inputs': [], | 103 'inputs': [], |
| 101 'outputs': [], | 104 'outputs': [], |
| 102 'action': [ | 105 'action': [ |
| 103 'env', | 106 'env', |
| 104 'PATH=%s' % os.environ['PATH'], | 107 'PATH=%s' % os.environ['PATH'], |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 new_data[sources_gyp] = {} | 253 new_data[sources_gyp] = {} |
| 251 new_data[sources_gyp]['targets'] = [] | 254 new_data[sources_gyp]['targets'] = [] |
| 252 new_data[sources_gyp]['included_files'] = [] | 255 new_data[sources_gyp]['included_files'] = [] |
| 253 new_data[sources_gyp]['xcode_settings'] = \ | 256 new_data[sources_gyp]['xcode_settings'] = \ |
| 254 data[orig_gyp].get('xcode_settings', {}) | 257 data[orig_gyp].get('xcode_settings', {}) |
| 255 new_data[sources_gyp]['targets'].append(new_data_target) | 258 new_data[sources_gyp]['targets'].append(new_data_target) |
| 256 | 259 |
| 257 # Write workspace to file. | 260 # Write workspace to file. |
| 258 _WriteWorkspace(main_gyp, sources_gyp) | 261 _WriteWorkspace(main_gyp, sources_gyp) |
| 259 return (new_target_list, new_target_dicts, new_data) | 262 return (new_target_list, new_target_dicts, new_data) |
| OLD | NEW |