Files
cuber/deps/Findsqlite3.cmake
T
portersky 90d013695d feat: add OpenGL abstraction layer with RAII resources
- Replace window class with cbt::opengl::context
- Add buffer resource (VBO, EBO, UBO, SSBO) with move semantics
- Add texture resource with format/type enums and filtering
- Add descriptor_set for Vulkan-style resource binding
- All resources use RAII with proper cleanup
2026-05-05 21:58:34 +02:00

47 lines
1.6 KiB
CMake

# ==============================================================================
# Findsqlite3.cmake
# ==============================================================================
# This module fetches and builds the SQLite amalgamation as a static library.
#
# Targets provided:
# sqlite3::sqlite3 - The SQLite static library target
#
# Variables set:
# sqlite3_FOUND - TRUE if sqlite3 is available
# sqlite3_LIBRARIES - The sqlite3 library target (sqlite3::sqlite3)
# sqlite3_INCLUDE_DIR - Include directory for sqlite3.h
# sqlite3_VERSION - Version of sqlite3
# ==============================================================================
if (DEFINED _FINDSQLITE3_INCLUDED)
return()
endif()
set(_FINDSQLITE3_INCLUDED TRUE)
set(SQLITE3_VERSION "3.52.0")
message(STATUS "Fetching sqlite3 ${SQLITE3_VERSION}")
include(FetchContent)
FetchContent_Declare(
sqlite3_amalgamation
URL https://sqlite.org/2026/sqlite-amalgamation-3520000.zip
URL_HASH SHA3_256=3fab435106250ea1cdfd5f9fa1657ad832fd431df1d817d48af66ba166e0d16e
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(sqlite3_amalgamation)
if (NOT TARGET sqlite3::sqlite3)
add_library(sqlite3 STATIC ${sqlite3_amalgamation_SOURCE_DIR}/sqlite3.c)
target_include_directories(sqlite3 PUBLIC ${sqlite3_amalgamation_SOURCE_DIR})
target_link_libraries(sqlite3 PRIVATE ${CMAKE_DL_LIBS})
add_library(sqlite3::sqlite3 ALIAS sqlite3)
endif()
set(sqlite3_FOUND TRUE)
set(sqlite3_LIBRARIES sqlite3::sqlite3)
set(sqlite3_VERSION "${SQLITE3_VERSION}")
set(sqlite3_INCLUDE_DIR "${sqlite3_amalgamation_SOURCE_DIR}")