FindSQLite3 — CMake 4.4.1 Documentation

# FindSQLite3

Added in version 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:

`SQLite3::SQLite3`

  Target encapsulating SQLite library usage requirements. It is available only when SQLite is found.

  Added in version 4.3.

`SQLite::SQLite3`

  Deprecated. Identical to `SQLite3::SQLite3`.

  If your project needs to support CMake < 4.3, consider adding the following to your project after calling `find_package(SQLite3 ...)`:

      if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3
        add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
      endif()

  This will allow your project to use the new name while still permitting it to compile with older versions of CMake.

## Result Variables

This module defines the following variables:

`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.

## Examples

Finding the SQLite library and linking it to a project target:

    find_package(SQLite3)
    target_link_libraries(project_target PRIVATE SQLite3::SQLite3)