/l10n/de_AT/

as/libdjinterop/atom/meson.build?h=master' type='application/atom+xml'/>
summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-09-19 13:21:35 +0100
committerAdam Szmigin <smidge@xsco.net>2020-09-23 22:46:38 +0100
commit535033da189df1b54cfe70ccc99860074021fe12 (patch)
treec54ece9bdf024667757362e40805c1dcbbe96b34 /meson.build
parent457d52e642a249126d8d55feb393bd993ad24690 (diff)
Allow building with embedded SQLite
* Meson and CMake builds take build option for system SQLite or embedded. * Unit tests no longer have direct SQLite dependency.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build23
1 files changed, 21 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f2fb038..6017948 100644
--- a/meson.build
+++ b/meson.build
@@ -1,23 +1,42 @@
project(
'djinterop',
'cpp', 'c',
- version: '0.13.0',
+ version: '0.14.0',
license: 'LGPL-3.0',
default_options: ['cpp_std=c++17', 'default_library=both'])
cpp_compiler = meson.get_compiler('cpp')
+
if cpp_compiler.get_id() == 'msvc'
# Ask MSVC to populate the __cplusplus macro properly.
add_global_arguments('/Zc:__cplusplus', language: 'cpp')
endif
+# Set hidden visibility arguments for everything the project, if available.
+if get_option('default_library') != 'static'
+ if cpp_compiler.has_argument('-fvisibility=hidden')
+ add_global_arguments('-fvisibility=hidden', language: ['c', 'cpp'])
+ endif
+endif
+
+
# libdl is "special", not like other dependencies
dl_dep = cpp_compiler.find_library('dl', required: false)
thread_dep = dependency('threads')
-sqlite3_dep = dependency('sqlite3', version: '>=3.11.0', fallback: ['sqlite', 'sqlite_dep'])
zlib_dep = dependency('zlib', version: '>=1.2.8', fallback: ['zlib', 'zlib_dep'])
+# We may either use a system-wide installation of SQLite, or our embedded one.
+if get_option('system_sqlite')
+ sqlite3_dep = dependency('sqlite3', version: '>=3.11.0')
+else
+ message('Using embedded SQLite')
+ sqlite3_dep = declare_dependency(
+ include_directories: 'ext/sqlite-amalgamation',
+ sources: 'ext/sqlite-amalgamation/sqlite3.c',
+ compile_args: ['-DSQLITE_OMIT_LOAD_EXTENSION'],
+ version: '3.33.0')
+endif
sqlite_modern_cpp_dep = declare_dependency(
dependencies: [sqlite3_dep],
include_directories: 'ext/sqlite_modern_cpp')