From 57271639664d02ad8c5e657d56d705483bb82d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 4 Apr 2020 14:20:07 +0200 Subject: [PATCH] SPM: export CSQLite package --- GRDB/Core/Export.swift | 4 ++++ Package.swift | 4 ++-- Sources/{sqlite3 => CSQLite}/module.modulemap | 0 Sources/{sqlite3 => CSQLite}/shim.h | 0 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 GRDB/Core/Export.swift rename Sources/{sqlite3 => CSQLite}/module.modulemap (100%) rename Sources/{sqlite3 => CSQLite}/shim.h (100%) diff --git a/GRDB/Core/Export.swift b/GRDB/Core/Export.swift new file mode 100644 index 000000000..150583bd3 --- /dev/null +++ b/GRDB/Core/Export.swift @@ -0,0 +1,4 @@ +#if SWIFT_PACKAGE +// Fix "No such module 'CSQLite' error in Xcode test targets +@_exported import CSQLite +#endif diff --git a/Package.swift b/Package.swift index 0f6c0342c..d100bc67a 100644 --- a/Package.swift +++ b/Package.swift @@ -18,11 +18,11 @@ let package = Package( ], targets: [ .systemLibrary( - name: "sqlite3", + name: "CSQLite", providers: [.apt(["libsqlite3-dev"])]), .target( name: "GRDB", - dependencies: ["sqlite3"], + dependencies: ["CSQLite"], path: "GRDB"), .testTarget( name: "GRDBTests", diff --git a/Sources/sqlite3/module.modulemap b/Sources/CSQLite/module.modulemap similarity index 100% rename from Sources/sqlite3/module.modulemap rename to Sources/CSQLite/module.modulemap diff --git a/Sources/sqlite3/shim.h b/Sources/CSQLite/shim.h similarity index 100% rename from Sources/sqlite3/shim.h rename to Sources/CSQLite/shim.h