Skip to content

Commit 12271f3

Browse files
committed
Fix <swift/briding> header missing issue on Linux
1 parent 9d8d6d8 commit 12271f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ let development = envEnable("OPENATTRIBUTEGRAPH_DEVELOPMENT", default: false)
3838
let swiftBinPath = Context.environment["_"] ?? "/usr/bin/swift"
3939
let swiftBinURL = URL(fileURLWithPath: swiftBinPath)
4040
let SDKPath = swiftBinURL.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent().path
41-
let includePath = SDKPath.appending("/usr/lib/swift")
41+
let swiftIncludePath = SDKPath.appending("/usr/lib/swift")
42+
let includePath = SDKPath.appending("/usr/include")
4243

4344
var sharedCSettings: [CSetting] = [
44-
.unsafeFlags(["-I", includePath], .when(platforms: .nonDarwinPlatforms)),
45+
.unsafeFlags(["-I", swiftIncludePath], .when(platforms: .nonDarwinPlatforms)), // NOTE: For CoreFoundation include
46+
.unsafeFlags(["-I", includePath], .when(platforms: .nonDarwinPlatforms)), // NOTE: somehow <swift/briding> is missing on non-Darwin SDK,
4547
.define("NDEBUG", .when(configuration: .release)),
4648
]
4749

0 commit comments

Comments
 (0)