Skip to content

Commit

Permalink
Fix compile error of SPM in Xcode 16
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiuwen-chen committed Sep 14, 2024
1 parent 2cff478 commit ba095b4
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 6 deletions.
173 changes: 168 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
.library(name: "WCDBSwiftDynamic", type: .dynamic, targets: ["WCDBSwift"]),
],
dependencies: [
.package(url: "https://github.com/Tencent/sqlcipher", .exactItem("1.4.5"))
.package(url: "https://github.com/Tencent/sqlcipher", .exactItem("1.4.6"))
],
targets: [
.target(
Expand All @@ -24,7 +24,68 @@ let package = Package(
sources: ["WCTFileManager.mm", "WCTFoundation.mm", "WCTFTSTokenizerUtil.mm", "WCTOperationQueue.mm"],
publicHeadersPath:"",
cSettings: [
.headerSearchPath("../../**"),
// .headerSearchPath("../../**"),
.headerSearchPath("../../bridge"),
.headerSearchPath("../../objc"),
.headerSearchPath("../../bridge/objcbridge"),
.headerSearchPath("../../bridge/cppbridge"),
.headerSearchPath("../../bridge/winqbridge"),
.headerSearchPath("../../bridge/base"),
.headerSearchPath("../../bridge/winqbridge/statement"),
.headerSearchPath("../../bridge/winqbridge/identifier"),
.headerSearchPath("../../common/core"),
.headerSearchPath("../../common/platform"),
.headerSearchPath("../../common/winq"),
.headerSearchPath("../../common/repair"),
.headerSearchPath("../../common/base"),
.headerSearchPath("../../common/utility"),
.headerSearchPath("../../common/core/config"),
.headerSearchPath("../../common/core/assemble"),
.headerSearchPath("../../common/core/vacuum"),
.headerSearchPath("../../common/core/cipher"),
.headerSearchPath("../../common/core/sqlite"),
.headerSearchPath("../../common/core/function"),
.headerSearchPath("../../common/core/fts"),
.headerSearchPath("../../common/core/operate"),
.headerSearchPath("../../common/core/compression"),
.headerSearchPath("../../common/core/integrity"),
.headerSearchPath("../../common/core/migration"),
.headerSearchPath("../../common/core/function/scalar"),
.headerSearchPath("../../common/core/fts/auxfunction"),
.headerSearchPath("../../common/core/fts/tokenizer"),
.headerSearchPath("../../common/winq/extension"),
.headerSearchPath("../../common/winq/statement"),
.headerSearchPath("../../common/winq/identifier"),
.headerSearchPath("../../common/winq/syntax"),
.headerSearchPath("../../common/winq/syntax/stmt"),
.headerSearchPath("../../common/winq/syntax/const"),
.headerSearchPath("../../common/winq/syntax/identifier"),
.headerSearchPath("../../common/repair/mechanic"),
.headerSearchPath("../../common/repair/parse"),
.headerSearchPath("../../common/repair/basic"),
.headerSearchPath("../../common/repair/sqlite"),
.headerSearchPath("../../common/repair/crawl"),
.headerSearchPath("../../common/repair/factory"),
.headerSearchPath("../../common/repair/utility"),
.headerSearchPath("../../objc/transaction"),
.headerSearchPath("../../objc/database"),
.headerSearchPath("../../objc/monitor"),
.headerSearchPath("../../objc/core"),
.headerSearchPath("../../objc/handle"),
.headerSearchPath("../../objc/bridge"),
.headerSearchPath("../../objc/statement"),
.headerSearchPath("../../objc/fts"),
.headerSearchPath("../../objc/chaincall"),
.headerSearchPath("../../objc/table"),
.headerSearchPath("../../objc/compression"),
.headerSearchPath("../../objc/orm"),
.headerSearchPath("../../objc/convenient"),
.headerSearchPath("../../objc/migration"),
.headerSearchPath("../../objc/builtin"),
.headerSearchPath("../../objc/orm/accessor"),
.headerSearchPath("../../objc/orm/binding"),
.headerSearchPath("../../objc/orm/macro"),
.headerSearchPath("../../objc/orm/coding")
],
linkerSettings: [
.linkedFramework("UIKit", .when(platforms: [.iOS])),
Expand Down Expand Up @@ -52,7 +113,41 @@ let package = Package(
.define("SQLITE_DEFAULT_WAL_SYNCHRONOUS", to: "1"),
.define("SQLITE_DEFAULT_LOCKING_MODE", to: "0"),
.define("SQLITE_DEFAULT_WAL_AUTOCHECKPOINT", to: "0"),
.headerSearchPath("**")
// .headerSearchPath("**")
.headerSearchPath("core"),
.headerSearchPath("platform"),
.headerSearchPath("winq"),
.headerSearchPath("repair"),
.headerSearchPath("base"),
.headerSearchPath("utility"),
.headerSearchPath("core/config"),
.headerSearchPath("core/assemble"),
.headerSearchPath("core/vacuum"),
.headerSearchPath("core/cipher"),
.headerSearchPath("core/sqlite"),
.headerSearchPath("core/function"),
.headerSearchPath("core/fts"),
.headerSearchPath("core/operate"),
.headerSearchPath("core/compression"),
.headerSearchPath("core/integrity"),
.headerSearchPath("core/migration"),
.headerSearchPath("core/function/scalar"),
.headerSearchPath("core/fts/auxfunction"),
.headerSearchPath("core/fts/tokenizer"),
.headerSearchPath("winq/extension"),
.headerSearchPath("winq/statement"),
.headerSearchPath("winq/identifier"),
.headerSearchPath("winq/syntax"),
.headerSearchPath("winq/syntax/stmt"),
.headerSearchPath("winq/syntax/const"),
.headerSearchPath("winq/syntax/identifier"),
.headerSearchPath("repair/mechanic"),
.headerSearchPath("repair/parse"),
.headerSearchPath("repair/basic"),
.headerSearchPath("repair/sqlite"),
.headerSearchPath("repair/crawl"),
.headerSearchPath("repair/factory"),
.headerSearchPath("repair/utility")
],
linkerSettings: [
.linkedLibrary("z"),
Expand All @@ -66,7 +161,68 @@ let package = Package(
"tests",
],
cSettings: [
.headerSearchPath("../**")
// .headerSearchPath("../**")
.headerSearchPath("../bridge"),
.headerSearchPath("../objc"),
.headerSearchPath("../bridge/objcbridge"),
.headerSearchPath("../bridge/cppbridge"),
.headerSearchPath("../bridge/winqbridge"),
.headerSearchPath("../bridge/base"),
.headerSearchPath("../bridge/winqbridge/statement"),
.headerSearchPath("../bridge/winqbridge/identifier"),
.headerSearchPath("../common/core"),
.headerSearchPath("../common/platform"),
.headerSearchPath("../common/winq"),
.headerSearchPath("../common/repair"),
.headerSearchPath("../common/base"),
.headerSearchPath("../common/utility"),
.headerSearchPath("../common/core/config"),
.headerSearchPath("../common/core/assemble"),
.headerSearchPath("../common/core/vacuum"),
.headerSearchPath("../common/core/cipher"),
.headerSearchPath("../common/core/sqlite"),
.headerSearchPath("../common/core/function"),
.headerSearchPath("../common/core/fts"),
.headerSearchPath("../common/core/operate"),
.headerSearchPath("../common/core/compression"),
.headerSearchPath("../common/core/integrity"),
.headerSearchPath("../common/core/migration"),
.headerSearchPath("../common/core/function/scalar"),
.headerSearchPath("../common/core/fts/auxfunction"),
.headerSearchPath("../common/core/fts/tokenizer"),
.headerSearchPath("../common/winq/extension"),
.headerSearchPath("../common/winq/statement"),
.headerSearchPath("../common/winq/identifier"),
.headerSearchPath("../common/winq/syntax"),
.headerSearchPath("../common/winq/syntax/stmt"),
.headerSearchPath("../common/winq/syntax/const"),
.headerSearchPath("../common/winq/syntax/identifier"),
.headerSearchPath("../common/repair/mechanic"),
.headerSearchPath("../common/repair/parse"),
.headerSearchPath("../common/repair/basic"),
.headerSearchPath("../common/repair/sqlite"),
.headerSearchPath("../common/repair/crawl"),
.headerSearchPath("../common/repair/factory"),
.headerSearchPath("../common/repair/utility"),
.headerSearchPath("../objc/transaction"),
.headerSearchPath("../objc/database"),
.headerSearchPath("../objc/monitor"),
.headerSearchPath("../objc/core"),
.headerSearchPath("../objc/handle"),
.headerSearchPath("../objc/bridge"),
.headerSearchPath("../objc/statement"),
.headerSearchPath("../objc/fts"),
.headerSearchPath("../objc/chaincall"),
.headerSearchPath("../objc/table"),
.headerSearchPath("../objc/compression"),
.headerSearchPath("../objc/orm"),
.headerSearchPath("../objc/convenient"),
.headerSearchPath("../objc/migration"),
.headerSearchPath("../objc/builtin"),
.headerSearchPath("../objc/orm/accessor"),
.headerSearchPath("../objc/orm/binding"),
.headerSearchPath("../objc/orm/macro"),
.headerSearchPath("../objc/orm/coding")
]
),
.target(
Expand All @@ -78,7 +234,14 @@ let package = Package(
],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("../bridge/**")
// .headerSearchPath("../bridge/**")
.headerSearchPath("../bridge"),
.headerSearchPath("../bridge/objcbridge"),
.headerSearchPath("../bridge/cppbridge"),
.headerSearchPath("../bridge/winqbridge"),
.headerSearchPath("../bridge/base"),
.headerSearchPath("../bridge/winqbridge/statement"),
.headerSearchPath("../bridge/winqbridge/identifier")
]
)
],
Expand Down
2 changes: 1 addition & 1 deletion sqlcipher
Submodule sqlcipher updated 1 files
+8 −1 Package.swift

0 comments on commit ba095b4

Please sign in to comment.