Skip to content

Commit 70fb7af

Browse files
authored
Merge pull request stephencelis#970 from bmwalters/fix/standalone-3.30.0
Fix building with standalone sqlite3 >= 3.30.0
2 parents 0a9893e + ef3f88f commit 70fb7af

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

SQLite.swift.podspec

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ Pod::Spec.new do |s|
5050
ss.private_header_files = 'Sources/SQLiteObjc/*.h'
5151

5252
ss.xcconfig = {
53-
'OTHER_SWIFT_FLAGS' => '$(inherited) -DSQLITE_SWIFT_STANDALONE'
53+
'OTHER_SWIFT_FLAGS' => '$(inherited) -DSQLITE_SWIFT_STANDALONE',
54+
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) SQLITE_SWIFT_STANDALONE=1'
5455
}
5556
ss.dependency 'sqlite3'
5657

Sources/SQLiteObjc/include/SQLiteObjc.h

+4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
//
2424

2525
@import Foundation;
26+
#if defined(SQLITE_SWIFT_STANDALONE)
27+
@import sqlite3;
28+
#else
2629
@import SQLite3;
30+
#endif
2731

2832
NS_ASSUME_NONNULL_BEGIN
2933
typedef NSString * _Nullable (^_SQLiteTokenizerNextCallback)(const char *input, int *inputOffset, int *inputLength);

0 commit comments

Comments
 (0)