Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: pylib/gyp/generator/xcode.py

Issue 10749020: Adds support for the library_dirs key, which appears in the documentation but was never actually im… (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 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 import filecmp 5 import filecmp
6 import gyp.common 6 import gyp.common
7 import gyp.xcodeproj_file 7 import gyp.xcodeproj_file
8 import errno 8 import errno
9 import os 9 import os
10 import posixpath 10 import posixpath
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 library_dir not in xct.GetBuildSetting(_library_search_paths_var)): 1174 library_dir not in xct.GetBuildSetting(_library_search_paths_var)):
1175 xct.AppendBuildSetting(_library_search_paths_var, library_dir) 1175 xct.AppendBuildSetting(_library_search_paths_var, library_dir)
1176 1176
1177 for configuration_name in configuration_names: 1177 for configuration_name in configuration_names:
1178 configuration = spec['configurations'][configuration_name] 1178 configuration = spec['configurations'][configuration_name]
1179 xcbc = xct.ConfigurationNamed(configuration_name) 1179 xcbc = xct.ConfigurationNamed(configuration_name)
1180 for include_dir in configuration.get('mac_framework_dirs', []): 1180 for include_dir in configuration.get('mac_framework_dirs', []):
1181 xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir) 1181 xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir)
1182 for include_dir in configuration.get('include_dirs', []): 1182 for include_dir in configuration.get('include_dirs', []):
1183 xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir) 1183 xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir)
1184 for library_dir in configuration.get('library_dirs', []):
1185 if library_dir not in xcode_standard_library_dirs and (
1186 not xcbc.HasBuildSetting(_library_search_paths_var) or
1187 library_dir not in xcbc.GetBuildSetting(_library_search_paths_var)):
1188 xcbc.AppendBuildSetting(_library_search_paths_var, library_dir)
1189
1184 if 'defines' in configuration: 1190 if 'defines' in configuration:
1185 for define in configuration['defines']: 1191 for define in configuration['defines']:
1186 set_define = EscapeXCodeArgument(define) 1192 set_define = EscapeXCodeArgument(define)
1187 xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) 1193 xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define)
1188 if 'xcode_settings' in configuration: 1194 if 'xcode_settings' in configuration:
1189 for xck, xcv in configuration['xcode_settings'].iteritems(): 1195 for xck, xcv in configuration['xcode_settings'].iteritems():
1190 xcbc.SetBuildSetting(xck, xcv) 1196 xcbc.SetBuildSetting(xck, xcv)
1191 if 'xcode_config_file' in configuration: 1197 if 'xcode_config_file' in configuration:
1192 config_ref = pbxp.AddOrGetFileInRootGroup( 1198 config_ref = pbxp.AddOrGetFileInRootGroup(
1193 configuration['xcode_config_file']) 1199 configuration['xcode_config_file'])
1194 xcbc.SetBaseConfiguration(config_ref) 1200 xcbc.SetBaseConfiguration(config_ref)
1195 1201
1196 build_files = [] 1202 build_files = []
1197 for build_file, build_file_dict in data.iteritems(): 1203 for build_file, build_file_dict in data.iteritems():
1198 if build_file.endswith('.gyp'): 1204 if build_file.endswith('.gyp'):
1199 build_files.append(build_file) 1205 build_files.append(build_file)
1200 1206
1201 for build_file in build_files: 1207 for build_file in build_files:
1202 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) 1208 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
1203 1209
1204 for build_file in build_files: 1210 for build_file in build_files:
1205 xcode_projects[build_file].Finalize2(xcode_targets, 1211 xcode_projects[build_file].Finalize2(xcode_targets,
1206 xcode_target_to_target_dict) 1212 xcode_target_to_target_dict)
1207 1213
1208 for build_file in build_files: 1214 for build_file in build_files:
1209 xcode_projects[build_file].Write() 1215 xcode_projects[build_file].Write()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/scons.py ('k') | pylib/gyp/input.py » ('j') | pylib/gyp/input.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698