blob: 8fd9719ec7dbc34cda4126c37dfaa2b1adb3345a (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#.rst:
# FindSqlite3
# -----------
# Finds the SQLite3 library
#
# This will define the following variables::
#
# SQLITE3_FOUND - system has SQLite3
# SQLITE3_INCLUDE_DIRS - the SQLite3 include directory
# SQLITE3_LIBRARIES - the SQLite3 libraries
#
# and the following imported targets::
#
# SQLite3::SQLite3 - The SQLite3 library
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_SQLITE3 sqlite3 QUIET)
endif()
find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h
PATHS ${PC_SQLITE3_INCLUDEDIR})
find_library(SQLITE3_LIBRARY NAMES sqlite3
PATHS ${PC_SQLITE3_LIBDIR})
set(SQLITE3_VERSION ${PC_SQLITE3_VERSION})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sqlite3
REQUIRED_VARS SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR
VERSION_VAR SQLITE3_VERSION)
if(SQLITE3_FOUND)
set(SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
set(SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
if(NOT TARGET SQLite3::SQLite3)
add_library(SQLite3::SQLite3 UNKNOWN IMPORTED)
set_target_properties(SQLite3::SQLite3 PROPERTIES
IMPORTED_LOCATION "${SQLITE3_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${SQLITE3_INCLUDE_DIR}")
endif()
endif()
mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|