diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b69476..0cd459d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # SQLite3: use system library on Linux, vendored amalgamation on Windows cross-compile find_package(SQLite3 QUIET) -if(NOT SQLite3_FOUND) +if(NOT SQLite3_FOUND AND NOT TARGET sqlite3_vendored) # Build from amalgamation set(SQLITE3_AMALG_DIR ${CMAKE_SOURCE_DIR}/vendor/sqlite3) add_library(sqlite3_vendored STATIC ${SQLITE3_AMALG_DIR}/sqlite3.c)