From 1d8ba361fc61f769465ae4f3185d2b6205eae463 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Wed, 14 May 2025 22:53:36 +0300 Subject: [PATCH] Fix compiling journal lib without sqlite --- libs/journal/CMakeLists.txt | 6 +++++- libs/journal/source/journal.cpp | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/journal/CMakeLists.txt b/libs/journal/CMakeLists.txt index 8cca1e28..cb4e3fd9 100644 --- a/libs/journal/CMakeLists.txt +++ b/libs/journal/CMakeLists.txt @@ -7,4 +7,8 @@ endif() psemek_add_library(psemek-journal ${PSEMEK_JOURNAL_HEADERS} ${PSEMEK_JOURNAL_SOURCES}) target_include_directories(psemek-journal PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ${SQLite3_INCLUDE_DIRS}) -target_link_libraries(psemek-journal PUBLIC psemek-util psemek-log SQLite::SQLite3) +target_link_libraries(psemek-journal PUBLIC psemek-util psemek-log) + +if(PSEMEK_USE_SQLITE) + target_link_libraries(psemek-journal PUBLIC SQLite::SQLite3) +endif() diff --git a/libs/journal/source/journal.cpp b/libs/journal/source/journal.cpp index 7ced403f..82f1f4d7 100644 --- a/libs/journal/source/journal.cpp +++ b/libs/journal/source/journal.cpp @@ -147,6 +147,11 @@ namespace psemek::journal void log_event(event const &) {} + std::vector> select(std::string const &) + { + return {}; + } + bool enabled = true; };