Commit daa67520 authored by Jeremy Slater's avatar Jeremy Slater

Configure integration targets without specs

parent df7a0272
......@@ -164,25 +164,9 @@ module Pod
def generate_targets
targets = []
result.specs_by_target.each do |target_definition, specs|
libs_by_name = {}
target = Target.new(target_definition, sandbox)
targets << target
specs.each do |spec|
lib_target = Podfile::TargetDefinition.from_hash(target_definition.to_hash, target_definition.parent)
if target_definition.name == 'Pods'
lib_target.name = spec.name.gsub('/', '-')
else
lib_target.name = "#{target_definition.name}-#{spec.name.gsub('/', '-')}"
end
lib = Target.new(lib_target, sandbox)
libs_by_name[spec.name] = lib
lib.support_files_root = sandbox.library_support_files_dir(lib.name)
lib.platform = target_definition.platform
lib.spec = spec
target.support_files_root = sandbox.library_support_files_dir(target.name)
target.platform = target_definition.platform
......@@ -191,27 +175,33 @@ module Pod
user_project = Xcodeproj::Project.new(project_path)
native_targets = compute_user_project_targets(target_definition, user_project)
lib.user_project_path = project_path
lib.client_root = project_path.dirname
lib.user_build_configurations = compute_user_build_configurations(target_definition, native_targets)
target.user_project_path = project_path
target.client_root = project_path.dirname
target.user_target_uuids = native_targets.map(&:uuid)
target.user_build_configurations = compute_user_build_configurations(target_definition, native_targets)
else
lib.client_root = config.installation_root
lib.user_target_uuids = []
lib.user_build_configurations = {}
target.client_root = config.installation_root
target.user_target_uuids = []
target.user_build_configurations = {}
end
target.libraries << lib
specs.each do |spec|
lib_target = Podfile::TargetDefinition.from_hash(target_definition.to_hash, target_definition.parent)
if target_definition.name == 'Pods'
lib_target.name = spec.name.gsub('/', '-')
else
lib_target.name = "#{target_definition.name}-#{spec.name.gsub('/', '-')}"
end
target.libraries.each do |library|
library.libraries = library.spec.dependencies(library.platform).map { |dep| libs_by_name[dep.name] }
lib = Target.new(lib_target, sandbox)
lib.spec = spec
lib.support_files_root = target.support_files_root
lib.platform = target.platform
lib.user_project_path = target.user_project_path
lib.client_root = target.client_root
lib.user_build_configurations = target.user_build_configurations
target.libraries << lib
end
end
targets
......
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