[macOS] do not check for load_extension if using internal sqlite3

This commit is contained in:
Jonathan Guzmán 2023-02-12 12:57:33 -06:00
parent c31eae9887
commit 69076e87cb
No known key found for this signature in database
GPG Key ID: C2956F1668BA042A

View File

@ -159,6 +159,9 @@ if get_option('SQLITE_OMIT_LOAD_EXTENSION')
sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION'] sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION']
## check if running on OSX ## check if running on OSX
elif host_machine.system() == 'darwin' and sqlite3_dep.found() elif host_machine.system() == 'darwin' and sqlite3_dep.found()
## check if sqlite3 is the one bundled with OSX
if sqlite3_dep.type_name() != 'internal'
message('warning: Detected non-internal SQLite3 in OSX, check if it supports load extension')
sqlite3_load_extension_support = cxx.links( sqlite3_load_extension_support = cxx.links(
''' '''
#include <sqlite3.h> #include <sqlite3.h>
@ -175,6 +178,7 @@ elif host_machine.system() == 'darwin' and sqlite3_dep.found()
message('warning: You can disable this warning by setting SQLITE_OMIT_LOAD_EXTENSION to false') message('warning: You can disable this warning by setting SQLITE_OMIT_LOAD_EXTENSION to false')
sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION'] sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION']
endif endif
endif
endif endif