cmake_minimum_required(VERSION 3.16)
project(shrap)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(SQLITE_OMIT_LOAD_EXTENSION ON CACHE BOOL "Disable SQLite load_extension()" FORCE)

find_package(blake3 REQUIRED)

include(FetchContent)
FetchContent_Declare(
    SQLiteCpp
    GIT_REPOSITORY https://github.com/SRombauts/SQLiteCpp
    GIT_TAG 3.3.3
)
FetchContent_MakeAvailable(SQLiteCpp)

add_executable(${PROJECT_NAME} src/main.cc)

target_link_libraries(${PROJECT_NAME} PRIVATE blake3 SQLiteCpp)

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-static")
