Permalink
Browse files

[ttmodule] Use -force_load instead of -ObjC and -all_load.

  • Loading branch information...
1 parent de65d35 commit 564a013d4eec081963c9b57dd3c0294604c85295 @jverkoey jverkoey committed Oct 22, 2010
Showing with 12 additions and 6 deletions.
  1. +9 −4 src/scripts/Pbxproj.py
  2. +3 −2 src/scripts/ttmodule.py
View
@@ -310,12 +310,17 @@ def add_file_to_frameworks_phase(self, name, guid):
return True
+ def get_rel_path_to_products_dir(self):
+ project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath()))
+ build_path = os.path.join(os.path.join(os.path.dirname(Paths.src_dir), 'Build'), 'Products')
+ return relpath(project_path, build_path)
+
def add_header_search_path(self, configuration):
project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath()))
build_path = os.path.join(os.path.join(os.path.join(os.path.dirname(Paths.src_dir), 'Build'), 'Products'), 'three20')
rel_path = relpath(project_path, build_path)
- return self.add_build_setting(configuration, 'HEADER_SEARCH_PATHS', rel_path)
+ return self.add_build_setting(configuration, 'HEADER_SEARCH_PATHS', '"'+rel_path+'"')
def add_build_setting(self, configuration, setting_name, value):
project_data = self.get_project_data()
@@ -333,7 +338,7 @@ def add_build_setting(self, configuration, setting_name, value):
match = re.search(re.escape(setting_name)+' = ((?:.|\n)+?);', build_settings)
if not match:
- settingtext = '\t\t\t\t'+setting_name+' = "'+value+'";\n'
+ settingtext = '\t\t\t\t'+setting_name+' = '+value+';\n'
project_data = project_data[:settings_start] + settingtext + project_data[settings_start:]
else:
@@ -343,12 +348,12 @@ def add_build_setting(self, configuration, setting_name, value):
if not match:
match = re.search(re.escape(setting_name)+' = \(\n', build_settings)
- build_settings = build_settings[:match.end()] + '\t\t\t\t\t"'+value+'",\n' + build_settings[match.end():]
+ build_settings = build_settings[:match.end()] + '\t\t\t\t\t'+value+',\n' + build_settings[match.end():]
project_data = project_data[:settings_start] + build_settings + project_data[settings_end:]
else:
if search_paths != value:
existing_path = search_paths
- path_set = '(\n\t\t\t\t\t"'+value+'",\n\t\t\t\t\t'+existing_path+'\n\t\t\t\t)'
+ path_set = '(\n\t\t\t\t\t'+value+',\n\t\t\t\t\t'+existing_path+'\n\t\t\t\t)'
build_settings = build_settings[:match.start(1)] + path_set + build_settings[match.end(1):]
project_data = project_data[:settings_start] + build_settings + project_data[settings_end:]
View
@@ -85,8 +85,9 @@ def add_modules_to_project(module_names, project, configs):
if configs:
for config in configs:
project.add_header_search_path(config)
- project.add_build_setting(config, 'OTHER_LDFLAGS', '-ObjC')
- project.add_build_setting(config, 'OTHER_LDFLAGS', '-all_load')
+
+ for k,v in modules.items():
+ project.add_build_setting(config, 'OTHER_LDFLAGS', '"-force_load '+project.get_rel_path_to_products_dir()+'/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/'+v._product_name+'"')
if len(failed) > 0:
logging.error("Some dependencies failed to be added:")

0 comments on commit 564a013

Please sign in to comment.