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

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: library_dirs Created 7 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 sys 10 import sys
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 library_dir not in xct.GetBuildSetting(_library_search_paths_var)): 1204 library_dir not in xct.GetBuildSetting(_library_search_paths_var)):
1205 xct.AppendBuildSetting(_library_search_paths_var, library_dir) 1205 xct.AppendBuildSetting(_library_search_paths_var, library_dir)
1206 1206
1207 for configuration_name in configuration_names: 1207 for configuration_name in configuration_names:
1208 configuration = spec['configurations'][configuration_name] 1208 configuration = spec['configurations'][configuration_name]
1209 xcbc = xct.ConfigurationNamed(configuration_name) 1209 xcbc = xct.ConfigurationNamed(configuration_name)
1210 for include_dir in configuration.get('mac_framework_dirs', []): 1210 for include_dir in configuration.get('mac_framework_dirs', []):
1211 xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir) 1211 xcbc.AppendBuildSetting('FRAMEWORK_SEARCH_PATHS', include_dir)
1212 for include_dir in configuration.get('include_dirs', []): 1212 for include_dir in configuration.get('include_dirs', []):
1213 xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir) 1213 xcbc.AppendBuildSetting('HEADER_SEARCH_PATHS', include_dir)
1214 for library_dir in configuration.get('library_dirs', []):
1215 if library_dir not in xcode_standard_library_dirs and (
1216 not xcbc.HasBuildSetting(_library_search_paths_var) or
1217 library_dir not in xcbc.GetBuildSetting(_library_search_paths_var)):
1218 xcbc.AppendBuildSetting(_library_search_paths_var, library_dir)
1219
1214 if 'defines' in configuration: 1220 if 'defines' in configuration:
1215 for define in configuration['defines']: 1221 for define in configuration['defines']:
1216 set_define = EscapeXCodeArgument(define) 1222 set_define = EscapeXCodeArgument(define)
1217 xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define) 1223 xcbc.AppendBuildSetting('GCC_PREPROCESSOR_DEFINITIONS', set_define)
1218 if 'xcode_settings' in configuration: 1224 if 'xcode_settings' in configuration:
1219 for xck, xcv in configuration['xcode_settings'].iteritems(): 1225 for xck, xcv in configuration['xcode_settings'].iteritems():
1220 xcbc.SetBuildSetting(xck, xcv) 1226 xcbc.SetBuildSetting(xck, xcv)
1221 if 'xcode_config_file' in configuration: 1227 if 'xcode_config_file' in configuration:
1222 config_ref = pbxp.AddOrGetFileInRootGroup( 1228 config_ref = pbxp.AddOrGetFileInRootGroup(
1223 configuration['xcode_config_file']) 1229 configuration['xcode_config_file'])
1224 xcbc.SetBaseConfiguration(config_ref) 1230 xcbc.SetBaseConfiguration(config_ref)
1225 1231
1226 build_files = [] 1232 build_files = []
1227 for build_file, build_file_dict in data.iteritems(): 1233 for build_file, build_file_dict in data.iteritems():
1228 if build_file.endswith('.gyp'): 1234 if build_file.endswith('.gyp'):
1229 build_files.append(build_file) 1235 build_files.append(build_file)
1230 1236
1231 for build_file in build_files: 1237 for build_file in build_files:
1232 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) 1238 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
1233 1239
1234 for build_file in build_files: 1240 for build_file in build_files:
1235 xcode_projects[build_file].Finalize2(xcode_targets, 1241 xcode_projects[build_file].Finalize2(xcode_targets,
1236 xcode_target_to_target_dict) 1242 xcode_target_to_target_dict)
1237 1243
1238 for build_file in build_files: 1244 for build_file in build_files:
1239 xcode_projects[build_file].Write() 1245 xcode_projects[build_file].Write()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698