Skip to content

Commit 046dd7e

Browse files
committed
Set EXECUTABLE_PREFIX for shared libraries
- use a build setting to set the missing "lib" prefix on platforms that should have one (all but windows)
1 parent e3cb4a5 commit 046dd7e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftBuildSupport/PackagePIFBuilder+Helpers.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,11 @@ extension ProjectModel.BuildSettings {
10321032
self[.PRODUCT_BUNDLE_IDENTIFIER] = "\(packageIdentity).\(productName)".spm_mangledToBundleIdentifier()
10331033
self[.SWIFT_PACKAGE_NAME] = packageName ?? nil
10341034

1035+
//This should really be swift-build defaults set in the .xcspec files, but changing that requires some extensive testing to ensure xcode projects are not effected.
1036+
// So for now lets just force it here.
1037+
self[.EXECUTABLE_PREFIX] = "lib"
1038+
self[.EXECUTABLE_PREFIX, Platform.windows] = ""
1039+
10351040
if !createDylibForDynamicProducts {
10361041
self[.GENERATE_INFOPLIST_FILE] = "YES"
10371042
// If the built framework is named same as one of the target in the package,

0 commit comments

Comments
 (0)