MCPcopy Create free account
hub / github.com/nodejs/node / AddDependency

Method AddDependency

tools/gyp/pylib/gyp/xcodeproj_file.py:2678–2716  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

2676 return frameworks_phase
2677
2678 def AddDependency(self, other):
2679 # super
2680 XCTarget.AddDependency(self, other)
2681
2682 static_library_type = "com.apple.product-type.library.static"
2683 shared_library_type = "com.apple.product-type.library.dynamic"
2684 framework_type = "com.apple.product-type.framework"
2685 if (
2686 isinstance(other, PBXNativeTarget)
2687 and "productType" in self._properties
2688 and self._properties["productType"] != static_library_type
2689 and "productType" in other._properties
2690 and (
2691 other._properties["productType"] == static_library_type
2692 or (
2693 (
2694 other._properties["productType"]
2695 in {shared_library_type, framework_type}
2696 )
2697 and (
2698 (not other.HasBuildSetting("MACH_O_TYPE"))
2699 or other.GetBuildSetting("MACH_O_TYPE") != "mh_bundle"
2700 )
2701 )
2702 )
2703 ):
2704 file_ref = other.GetProperty("productReference")
2705
2706 pbxproject = self.PBXProjectAncestor()
2707 other_pbxproject = other.PBXProjectAncestor()
2708 if pbxproject != other_pbxproject:
2709 other_project_product_group = pbxproject.AddOrGetProjectReference(
2710 other_pbxproject
2711 )[0]
2712 file_ref = other_project_product_group.GetChildByRemoteObject(file_ref)
2713
2714 self.FrameworksPhase().AppendProperty(
2715 "files", PBXBuildFile({"fileRef": file_ref})
2716 )
2717
2718
2719class PBXAggregateTarget(XCTarget):

Callers

nothing calls this directly

Calls 10

FrameworksPhaseMethod · 0.95
PBXBuildFileClass · 0.85
GetPropertyMethod · 0.80
AppendPropertyMethod · 0.80
AddDependencyMethod · 0.45
HasBuildSettingMethod · 0.45
GetBuildSettingMethod · 0.45
PBXProjectAncestorMethod · 0.45

Tested by

no test coverage detected