blob: b010e0c78af173ed58e8d8358005be2c8f2266ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
if(TARGET mbgl-vendor-sqlite)
return()
endif()
add_library(
mbgl-vendor-sqlite STATIC
${CMAKE_CURRENT_LIST_DIR}/sqlite/src/sqlite3.c
)
include(CheckSymbolExists)
check_symbol_exists("strerror_r" "string.h" MBGL_SQLITE3_HAVE_STRERROR_R)
if(MBGL_SQLITE3_HAVE_STRERROR_R)
target_compile_definitions(
mbgl-vendor-sqlite
PRIVATE HAVE_STRERROR_R
)
endif()
# So we don't need to link with -ldl
target_compile_definitions(
mbgl-vendor-sqlite
PRIVATE SQLITE_OMIT_LOAD_EXTENSION SQLITE_THREADSAFE
)
target_include_directories(
mbgl-vendor-sqlite SYSTEM
INTERFACE ${CMAKE_CURRENT_LIST_DIR}/sqlite/include
)
|