Skip to content

Commit 00c1035

Browse files
committed
Fix dylib build issue
1 parent 0547bcc commit 00c1035

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Package.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,21 @@ let openBoxCompatibilityTestTarget = Target.testTarget(
7272

7373
// MARK: - Package
7474

75+
let libraryType: Product.Library.LibraryType?
76+
switch Context.environment["OPENBOX_LIBRARY_TYPE"] {
77+
case "dynamic":
78+
libraryType = .dynamic
79+
case "static":
80+
libraryType = .static
81+
default:
82+
libraryType = nil
83+
}
84+
7585
let package = Package(
7686
name: "OpenBox",
7787
products: [
78-
.library(name: "OpenBox", type: .dynamic, targets: ["OpenBox"]),
79-
.library(name: "OpenBoxShims", type: .dynamic, targets: ["OpenBoxShims"]),
88+
.library(name: "OpenBox", type: libraryType, targets: ["OpenBox"]),
89+
.library(name: "OpenBoxShims", type: libraryType, targets: ["OpenBoxShims"]),
8090
],
8191
dependencies: [
8292
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),

0 commit comments

Comments
 (0)