diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-08-30 21:38:50 +0300 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-09-05 12:26:15 +0200 |
commit | 679d66f36d0034978211e7cba00392b24e8576df (patch) | |
tree | ca25c290776b655e649f1728cc0fed9bcde7fcd2 /cmake | |
parent | 0e95e8f6b241ee8b30635a986f2c503f21997dd7 (diff) | |
download | qtlocation-mapboxgl-679d66f36d0034978211e7cba00392b24e8576df.tar.gz |
[build] use vendored SQLite for LTO benefits + custom compile flags
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/mason-dependencies.cmake | 2 | ||||
-rw-r--r-- | cmake/sqlite.cmake | 36 |
2 files changed, 36 insertions, 2 deletions
diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake index f869fe2fdc..d2ea79b32b 100644 --- a/cmake/mason-dependencies.cmake +++ b/cmake/mason-dependencies.cmake @@ -20,13 +20,11 @@ mason_use(vector-tile VERSION 1.0.2 HEADER_ONLY) if(MBGL_PLATFORM STREQUAL "android") mason_use(jni.hpp VERSION 3.0.0 HEADER_ONLY) - mason_use(sqlite VERSION 3.24.0-min-size) mason_use(icu VERSION 58.1-min-size) elseif(MBGL_PLATFORM STREQUAL "ios") mason_use(icu VERSION 58.1-min-size) elseif(MBGL_PLATFORM STREQUAL "linux") mason_use(glfw VERSION 2018-06-27-0be4f3f) - mason_use(sqlite VERSION 3.24.0-min-size) mason_use(libuv VERSION 1.9.1) mason_use(libpng VERSION 1.6.25) mason_use(libjpeg-turbo VERSION 1.5.0) diff --git a/cmake/sqlite.cmake b/cmake/sqlite.cmake new file mode 100644 index 0000000000..03841ea9b9 --- /dev/null +++ b/cmake/sqlite.cmake @@ -0,0 +1,36 @@ +add_vendor_target(sqlite STATIC) + +target_compile_definitions(sqlite + PRIVATE "-DVERSION=\"3.24.0\"" + PRIVATE "-DSTDC_HEADERS=int" + PRIVATE "-DHAVE_SYS_TYPES_H=1" + PRIVATE "-DHAVE_SYS_STAT_H=1" + PRIVATE "-DHAVE_STDLIB_H=1" + PRIVATE "-DHAVE_STRING_H=1" + PRIVATE "-DHAVE_MEMORY_H=1" + PRIVATE "-DHAVE_STRINGS_H=1" + PRIVATE "-DHAVE_INTTYPES_H=1" + PRIVATE "-DHAVE_STDINT_H=1" + PRIVATE "-DHAVE_UNISTD_H=1" + PRIVATE "-DHAVE_DLFCN_H=1" + PRIVATE "-DHAVE_FDATASYNC=1" + PRIVATE "-DHAVE_USLEEP=1" + PRIVATE "-DHAVE_LOCALTIME_R=1" + PRIVATE "-DHAVE_GMTIME_R=1" + PRIVATE "-DHAVE_DECL_STRERROR_R=1" + PRIVATE "-DHAVE_STRERROR_R=1" + PRIVATE "-DHAVE_ZLIB_H=1" + PRIVATE "-D_REENTRANT=1" + PRIVATE "-DSQLITE_THREADSAFE=1" + PRIVATE "-DSQLITE_HAVE_ZLIB" + + # These are disabled on purpose, since we're not using these features. + # PRIVATE "-DSQLITE_ENABLE_FTS5" + # PRIVATE "-DSQLITE_ENABLE_JSON1" + # PRIVATE "-DSQLITE_ENABLE_FTS3" + # PRIVATE "-DSQLITE_ENABLE_RTREE" +) + +target_compile_options(sqlite + PRIVATE "-Wno-int-conversion" +) |