Commit b44c0e10 authored by Marius Rackwitz's avatar Marius Rackwitz

Link frameworks from pod target

parent 51daf755
...@@ -58,9 +58,11 @@ module Pod ...@@ -58,9 +58,11 @@ module Pod
} }
if target.requires_framework? if target.requires_framework?
dependencies = target.module_dependencies.reject { |dep| dep == target.product_module_name }
build_settings = { build_settings = {
'CONFIGURATION_BUILD_DIR' => target.configuration_build_dir, 'CONFIGURATION_BUILD_DIR' => target.configuration_build_dir,
'FRAMEWORK_SEARCH_PATHS' => XCConfigHelper.quote([target.configuration_build_dir]), 'FRAMEWORK_SEARCH_PATHS' => XCConfigHelper.quote([target.configuration_build_dir]),
'OTHER_LDFLAGS' => '$(inherited) ' + XCConfigHelper.quote(dependencies, '-framework')
} }
config.merge!(build_settings) config.merge!(build_settings)
end end
......
...@@ -91,6 +91,13 @@ module Pod ...@@ -91,6 +91,13 @@ module Pod
end.flatten end.flatten
end end
# @return [Array<String>] The module names of the Pods on which this target
# depends.
#
def module_dependencies
dependencies.map { |dep_name| c99ext_identifier(dep_name) }
end
# Checks if the target should be included in the build configuration with # Checks if the target should be included in the build configuration with
# the given name. # the given name.
# #
......
...@@ -38,6 +38,11 @@ module Pod ...@@ -38,6 +38,11 @@ module Pod
@pod_target.dependencies.should == ['monkey'] @pod_target.dependencies.should == ['monkey']
end end
it 'returns the name of the modules of the Pods on which this target depends' do
@pod_target.stubs(:dependencies).returns(['human', 'M!lk', '3xP-Blender'])
@pod_target.module_dependencies.should == %w(human M_lk _3xP_Blender)
end
it 'returns whether it is whitelisted in a build configuration' do it 'returns whether it is whitelisted in a build configuration' do
@target_definition.store_pod('BananaLib') @target_definition.store_pod('BananaLib')
@target_definition.whitelist_pod_for_configuration('BananaLib', 'debug') @target_definition.whitelist_pod_for_configuration('BananaLib', 'debug')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment