Search for sqlite3 before vendoring

This commit is contained in:
Mo Morsi
2019-10-30 12:17:35 -04:00
committed by Nik Bougalis
parent 530f1939d6
commit 9bd470f2c7
3 changed files with 101 additions and 59 deletions

View File

@@ -0,0 +1,22 @@
find_package (PkgConfig REQUIRED)
pkg_search_module (sqlite_PC QUIET sqlite3>=3.26.0)
if(static)
set(SQLITE_LIB libsqlite3.a)
else()
set(SQLITE_LIB sqlite3.so)
endif()
find_library (sqlite3
NAMES ${SQLITE_LIB}
HINTS
${sqlite_PC_LIBDIR}
${sqlite_PC_LIBRARY_DIRS}
NO_DEFAULT_PATH)
find_path (SQLITE_INCLUDE_DIR
NAMES sqlite3.h
HINTS
${sqlite_PC_INCLUDEDIR}
${sqlite_PC_INCLUDEDIRS}
NO_DEFAULT_PATH)