FindSQLite3¶
在 3.14 版被加入.
Finds the SQLite 3 library:
find_package(SQLite3 [<version>] [...])
SQLite is a small, fast, self-contained, high-reliability, and full-featured SQL database engine written in C, intended for embedding in applications.
Imported Targets¶
This module provides the following Imported Targets:
SQLite::SQLite3
Target encapsulating SQLite library usage requirements. It is available only when SQLite is found.
結果變數¶
該模組定義了以下變數:
SQLite3_FOUND
Boolean indicating whether the (requested version of) SQLite library was found.
SQLite3_VERSION
The version of SQLite library found.
SQLite3_INCLUDE_DIRS
Include directories containing the
<sqlite3.h>
and related headers needed to use SQLite.SQLite3_LIBRARIES
Libraries needed to link against to use SQLite.
範例¶
Finding the SQLite library and linking it to a project target:
find_package(SQLite3)
target_link_libraries(project_target PRIVATE SQLite::SQLite3)