Skip to content

Commit

Permalink
Make: CMake pre 3.22 support
Browse files Browse the repository at this point in the history
ashvardanian committed Mar 30, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 39264d0 commit 145a4f4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions sqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -11,9 +11,18 @@ if (USEARCH_BUILD_SQLITE)
# find_package(SQLite3 REQUIRED) target_link_libraries(usearch_sqlite PRIVATE SQLite::SQLite3)
# target_include_directories(usearch_sqlite PRIVATE ${SQLite3_INCLUDE_DIRS})
include(FetchContent)
FetchContent_Declare(
sqlite3 URL https://sqlite.org/2024/sqlite-amalgamation-3450200.zip DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
FetchContent_Declare(
sqlite3
URL https://sqlite.org/2024/sqlite-amalgamation-3450200.zip
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
else ()
FetchContent_Declare(
sqlite3
URL https://sqlite.org/2024/sqlite-amalgamation-3450200.zip
)
endif ()
FetchContent_MakeAvailable(sqlite3)
add_library(sqlite3_shared SHARED ${sqlite3_SOURCE_DIR}/sqlite3.c)
target_include_directories(sqlite3_shared PUBLIC ${sqlite3_SOURCE_DIR})

0 comments on commit 145a4f4

Please sign in to comment.