mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-08 03:36:06 -04:00
[macOS] do not check for load_extension if using internal sqlite3
This commit is contained in:
parent
c31eae9887
commit
69076e87cb
34
meson.build
34
meson.build
@ -159,21 +159,25 @@ 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()
|
||||||
sqlite3_load_extension_support = cxx.links(
|
## check if sqlite3 is the one bundled with OSX
|
||||||
'''
|
if sqlite3_dep.type_name() != 'internal'
|
||||||
#include <sqlite3.h>
|
message('warning: Detected non-internal SQLite3 in OSX, check if it supports load extension')
|
||||||
int main() {
|
sqlite3_load_extension_support = cxx.links(
|
||||||
sqlite3_enable_load_extension(0, 0);
|
'''
|
||||||
return 0;
|
#include <sqlite3.h>
|
||||||
}
|
int main() {
|
||||||
''',
|
sqlite3_enable_load_extension(0, 0);
|
||||||
name: 'sqlite3_load_extension',
|
return 0;
|
||||||
dependencies: [sqlite3_dep])
|
}
|
||||||
if not sqlite3_load_extension_support
|
''',
|
||||||
message('warning: Detected bundled SQLite3 in OSX, but it does not support load extension')
|
name: 'sqlite3_load_extension',
|
||||||
message('warning: SQLiteCpp will be built without load extension support')
|
dependencies: [sqlite3_dep])
|
||||||
message('warning: You can disable this warning by setting SQLITE_OMIT_LOAD_EXTENSION to false')
|
if not sqlite3_load_extension_support
|
||||||
sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION']
|
message('warning: Detected bundled SQLite3 in OSX, but it does not support load extension')
|
||||||
|
message('warning: SQLiteCpp will be built without load extension support')
|
||||||
|
message('warning: You can disable this warning by setting SQLITE_OMIT_LOAD_EXTENSION to false')
|
||||||
|
sqlitecpp_args += ['-DSQLITE_OMIT_LOAD_EXTENSION']
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user