From ba095b410189e76921ae08a363f291cf09a65eae Mon Sep 17 00:00:00 2001 From: qiuwenchen Date: Sun, 15 Sep 2024 00:25:49 +0800 Subject: [PATCH] Fix compile error of SPM in Xcode 16 --- Package.swift | 173 ++++++++++++++++++++++++++++++++++++++++++++++++-- sqlcipher | 2 +- 2 files changed, 169 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index c7c5255a8..8c0acbf01 100644 --- a/Package.swift +++ b/Package.swift @@ -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( @@ -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])), @@ -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"), @@ -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( @@ -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") ] ) ], diff --git a/sqlcipher b/sqlcipher index 3297bc894..65edd76ea 160000 --- a/sqlcipher +++ b/sqlcipher @@ -1 +1 @@ -Subproject commit 3297bc894ff8053b128b3cf488c938d44d3f1e12 +Subproject commit 65edd76ea727b31d3265227dc435245d21ff371f