Skip to content

Commit 4ec5c98

Browse files
committed
Fix <swift/briding> header missing issue on Linux
1 parent d1f162d commit 4ec5c98

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

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

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

0 commit comments

Comments
 (0)