build a static obelisk library for easier linking with other software

This commit is contained in:
Chris Cromer 2023-02-25 21:27:32 -03:00
parent 1f8cc98ee2
commit 402862b54a
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
5 changed files with 258167 additions and 4 deletions

View File

@ -30,4 +30,5 @@ if docs_enabled
endif
endif
subdir('sqlite')
subdir('src')

20
sqlite/meson.build Normal file
View File

@ -0,0 +1,20 @@
sqlite_sources = files(
'sqlite3.c'
)
sqlite_include_directories = include_directories(['.'])
sqlite_args = [
'-DSQLITE_OMIT_DESERIALIZE',
'-DSQLITE_OMIT_DEPRECATED',
'-DSQLITE_OMIT_JSON',
'-DSQLITE_OMIT_LOAD_EXTENSION',
'-DSQLITE_OMIT_PROGRESS_CALLBACK',
'-DSQLITE_DEFAULT_FOREIGN_KEYS=1',
'-DSQLITE_DEFAULT_AUTOVACUUM=1',
'-DSQLITE_DISABLE_LFS',
'-DSQLITE_OMIT_TEMPDB',
'-DSQLITE_OMIT_GET_TABLE',
'-DSQLITE_OMIT_COMPLETE',
'-DSQLITE_OMIT_COMPILEOPTION_DIAGS'
]

245165
sqlite/sqlite3.c Normal file

File diff suppressed because it is too large Load Diff

12970
sqlite/sqlite3.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -16,14 +16,21 @@ obelisk_lib_sources = files(
)
obelisk_lib_sources += obelisk_model_sources
sqlite3 = dependency('sqlite3')
obelisk_lib_sources += sqlite_sources
incdirs = include_directories(['.', 'include'])
lib = library('obelisk',
lib = static_library('obelisk',
obelisk_lib_sources,
c_args : sqlite_args,
include_directories: [incdirs, sqlite_include_directories],
install : true
)
shared_library('obelisk',
obelisk_lib_sources,
c_args : sqlite_args,
include_directories: incdirs,
dependencies : [sqlite3],
version : meson.project_version(),
soversion : project_version_lib,
install : true