File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ def configure_packaged_libraries
9595 end
9696
9797 ldflags . each { |ldflag | append_ldflags ( ldflag ) }
98+
99+ append_cppflags ( "-DUSING_PACKAGED_LIBRARIES" )
100+ append_cppflags ( "-DUSING_PRECOMPILED_LIBRARIES" ) if cross_build?
98101 end
99102 end
100103
Original file line number Diff line number Diff line change @@ -210,4 +210,16 @@ Init_sqlite3_native(void)
210210
211211 /* (String) The version of the sqlite3 library loaded at runtime (e.g., "3.46.1") */
212212 rb_define_const (mSqlite3 , "SQLITE_LOADED_VERSION" , rb_str_new2 (sqlite3_libversion ()));
213+
214+ #ifdef USING_PACKAGED_LIBRARIES
215+ rb_define_const (mSqlite3 , "SQLITE_PACKAGED_LIBRARIES" , Qtrue );
216+ #else
217+ rb_define_const (mSqlite3 , "SQLITE_PACKAGED_LIBRARIES" , Qfalse );
218+ #endif
219+
220+ #ifdef USING_PRECOMPILED_LIBRARIES
221+ rb_define_const (mSqlite3 , "SQLITE_PRECOMPILED_LIBRARIES" , Qtrue );
222+ #else
223+ rb_define_const (mSqlite3 , "SQLITE_PRECOMPILED_LIBRARIES" , Qfalse );
224+ #endif
213225}
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ module SQLite3
88 sqlite : {
99 compiled : SQLite3 ::SQLITE_VERSION ,
1010 loaded : SQLite3 ::SQLITE_LOADED_VERSION ,
11+ packaged : SQLite3 ::SQLITE_PACKAGED_LIBRARIES ,
12+ precompiled : SQLite3 ::SQLITE_PRECOMPILED_LIBRARIES ,
1113 sqlcipher : SQLite3 . sqlcipher? ,
1214 threadsafe : SQLite3 . threadsafe?
1315 }
You can’t perform that action at this time.
0 commit comments