From 63711877057f1f89b4d1774e24fe20907a3af656 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Thu, 26 Sep 2024 07:46:06 -0500 Subject: Add SQLite interface. --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d5ebb4e..348cd36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ set(CXX_CPPCHECK "project=build/compile_commands.json;enable=information;force") set(CMAKE_EXPORT_COMPILE_COMMANDS true) +find_package(SQLite3 REQUIRED) + add_library(fud SHARED source/libfud.cpp source/fud_assert.cpp @@ -21,12 +23,15 @@ add_library(fud SHARED source/fud_string.cpp source/fud_utf8.cpp source/fud_utf8_iterator.cpp + source/fud_sqlite.cpp ) include(cmake/warnings.cmake) target_compile_options(fud PRIVATE "${FUD_WARNINGS}") -target_include_directories(fud PUBLIC include) +target_include_directories(fud PUBLIC include ${SQLite3_INCLUDE_DIRS}) + +target_link_libraries(fud ${SQLite3_LIBRARIES}) set_target_properties( fud PROPERTIES @@ -36,7 +41,6 @@ set_target_properties( C_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON) - if (FUD_TEST) add_subdirectory(test) # set(CVG_FLAGS -fsanitize=address -fsanitize=undefined --coverage) @@ -79,6 +83,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FudConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Fud ) set(FUD_HEADERS + "include/libfud.hpp" "include/fud_array.hpp" "include/fud_assert.hpp" "include/fud_c_file.hpp" @@ -90,7 +95,7 @@ set(FUD_HEADERS "include/fud_unique_array.hpp" "include/fud_utf8.hpp" "include/fud_utf8_iterator.hpp" - "include/libfud.hpp" + "include/fud_sqlite" ) set_target_properties(fud PROPERTIES PUBLIC_HEADER "${FUD_HEADERS}") -- cgit v1.2.3