@@ -613,16 +613,16 @@ extension PackagePIFProjectBuilder {
613
613
// Swift Build will *not* produce a separate artifact for a package product, but will instead consider any
614
614
// dependency on the package product to be a dependency on the whole set of targets
615
615
// on which the package product depends.
616
- let librayUmbrellaTargetKeyPath = try self . project. addTarget { _ in
616
+ let libraryUmbrellaTargetKeyPath = try self . project. addTarget { _ in
617
617
ProjectModel . Target (
618
618
id: product. pifTargetGUID ( suffix: targetSuffix) ,
619
619
productType: productType,
620
620
name: product. targetName ( suffix: targetSuffix) ,
621
- productName: product . name
621
+ productName: " $(EXECUTABLE_NAME) "
622
622
)
623
623
}
624
624
do {
625
- let librayTarget = self . project [ keyPath: librayUmbrellaTargetKeyPath ]
625
+ let librayTarget = self . project [ keyPath: libraryUmbrellaTargetKeyPath ]
626
626
log (
627
627
. debug,
628
628
" Created target ' \( librayTarget. id) ' of type ' \( librayTarget. productType) ' with " +
@@ -637,7 +637,7 @@ extension PackagePIFProjectBuilder {
637
637
let binaryFileRef = self . binaryGroup. addFileReference { id in
638
638
FileReference ( id: id, path: binaryTarget. artifactPath. pathString)
639
639
}
640
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . addLibrary { id in
640
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . addLibrary { id in
641
641
BuildFile ( id: id, fileRef: binaryFileRef, codeSignOnCopy: true , removeHeadersOnCopy: true )
642
642
}
643
643
log ( . debug, indent: 1 , " Added use of binary library ' \( binaryTarget. artifactPath) ' " )
@@ -646,7 +646,7 @@ extension PackagePIFProjectBuilder {
646
646
// We add these as linked dependencies; because the product type is `.packageProduct`,
647
647
// SwiftBuild won't actually link them, but will instead impart linkage to any clients that
648
648
// link against the package product.
649
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
649
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
650
650
on: module. pifTargetGUID,
651
651
platformFilters: [ ] ,
652
652
linkProduct: true
@@ -657,7 +657,7 @@ extension PackagePIFProjectBuilder {
657
657
for module in product. modules where module. underlying. isSourceModule && module. resources. hasContent {
658
658
// FIXME: Find a way to determine whether a module has generated resources
659
659
// here so that we can embed resources into dynamic targets.
660
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
660
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
661
661
on: pifTargetIdForResourceBundle ( module. name) ,
662
662
platformFilters: [ ]
663
663
)
@@ -667,7 +667,7 @@ extension PackagePIFProjectBuilder {
667
667
FileReference ( id: id, path: " $(CONFIGURATION_BUILD_DIR)/ \( packageName) _ \( module. name) .bundle " )
668
668
}
669
669
if embedResources {
670
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . addResourceFile { id in
670
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . addResourceFile { id in
671
671
BuildFile ( id: id, fileRef: fileRef)
672
672
}
673
673
log ( . debug, indent: 1 , " Added use of resource bundle ' \( fileRef. path) ' " )
@@ -693,7 +693,7 @@ extension PackagePIFProjectBuilder {
693
693
installPath: installPath ( for: product. underlying) ,
694
694
delegate: pifBuilder. delegate
695
695
)
696
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addSourcesBuildPhase { id in
696
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addSourcesBuildPhase { id in
697
697
ProjectModel . SourcesBuildPhase ( id: id)
698
698
}
699
699
}
@@ -702,7 +702,7 @@ extension PackagePIFProjectBuilder {
702
702
pifBuilder. delegate. configureLibraryProduct (
703
703
product: product. underlying,
704
704
project: & self . project,
705
- target: librayUmbrellaTargetKeyPath ,
705
+ target: libraryUmbrellaTargetKeyPath ,
706
706
additionalFiles: additionalFilesGroupKeyPath
707
707
)
708
708
@@ -732,7 +732,7 @@ extension PackagePIFProjectBuilder {
732
732
FileReference ( id: id, path: binaryTarget. path. pathString)
733
733
}
734
734
let toolsVersion = package . manifest. toolsVersion
735
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . addLibrary { id in
735
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . addLibrary { id in
736
736
BuildFile (
737
737
id: id,
738
738
fileRef: binaryFileRef,
@@ -747,7 +747,7 @@ extension PackagePIFProjectBuilder {
747
747
748
748
if moduleDependency. type == . plugin {
749
749
let dependencyId = moduleDependency. pifTargetGUID
750
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
750
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
751
751
on: dependencyId,
752
752
platformFilters: packageConditions
753
753
. toPlatformFilter ( toolsVersion: package . manifest. toolsVersion) ,
@@ -768,7 +768,7 @@ extension PackagePIFProjectBuilder {
768
768
if let product = moduleDependency
769
769
. productRepresentingDependencyOfBuildPlugin ( in: mainModuleProducts)
770
770
{
771
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
771
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
772
772
on: product. pifTargetGUID,
773
773
platformFilters: packageConditions
774
774
. toPlatformFilter ( toolsVersion: package . manifest. toolsVersion) ,
@@ -785,7 +785,7 @@ extension PackagePIFProjectBuilder {
785
785
}
786
786
}
787
787
788
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
788
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
789
789
on: moduleDependency. pifTargetGUID,
790
790
platformFilters: packageConditions. toPlatformFilter ( toolsVersion: package . manifest. toolsVersion) ,
791
791
linkProduct: true
@@ -803,7 +803,7 @@ extension PackagePIFProjectBuilder {
803
803
buildSettings: & settings
804
804
) {
805
805
let shouldLinkProduct = productDependency. isLinkable
806
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addDependency (
806
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addDependency (
807
807
on: productDependency. pifTargetGUID,
808
808
platformFilters: packageConditions
809
809
. toPlatformFilter ( toolsVersion: package . manifest. toolsVersion) ,
@@ -838,10 +838,10 @@ extension PackagePIFProjectBuilder {
838
838
settings [ . PACKAGE_REGISTRY_SIGNATURE] = String ( data: data, encoding: . utf8)
839
839
}
840
840
841
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addBuildConfig { id in
841
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addBuildConfig { id in
842
842
BuildConfig ( id: id, name: " Debug " , settings: settings)
843
843
}
844
- self . project [ keyPath: librayUmbrellaTargetKeyPath ] . common. addBuildConfig { id in
844
+ self . project [ keyPath: libraryUmbrellaTargetKeyPath ] . common. addBuildConfig { id in
845
845
BuildConfig ( id: id, name: " Release " , settings: settings)
846
846
}
847
847
@@ -861,7 +861,7 @@ extension PackagePIFProjectBuilder {
861
861
type: moduleOrProductType,
862
862
name: product. name,
863
863
moduleName: product. c99name,
864
- pifTarget: . target( self . project [ keyPath: librayUmbrellaTargetKeyPath ] ) ,
864
+ pifTarget: . target( self . project [ keyPath: libraryUmbrellaTargetKeyPath ] ) ,
865
865
indexableFileURLs: [ ] ,
866
866
headerFiles: [ ] ,
867
867
linkedPackageBinaries: linkedPackageBinaries,
0 commit comments