From 80f8493e0fd4dfdb9ba76561fcf67507920d7b98 Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Wed, 11 Sep 2024 14:57:03 +0000 Subject: [PATCH] build: update dependencies A pretty major change including a lot of refactoring. - New versions of the folllowing tools: - Conan 2 - Ubuntu 24.04 - LLVM 18 - Clean up deprecations (e.g. removed FetchContent_Populate) - Refactor the CMake files with comments added - Bump multiple dependencies, adapt to their new API - Migrated to conanfile.py - Use CMake presets (Fixes #7) --- .vscode/settings.json | 5 +- CMakeLists.txt | 56 ++----- CMakePresets.json | 43 +++++ Dockerfile | 158 ++++++++++++------ cmake/FindBun.cmake | 8 + cmake/FindYarn.cmake | 51 ------ cmake/bundled-deps.cmake | 37 ++++ cmake/deps.cmake | 64 +++++++ conanfile.py | 40 +++++ conanfile.txt | 36 ---- daemon/CMakeLists.txt | 28 +++- daemon/application.cpp | 5 +- daemon/di.h | 2 +- daemon/events.h | 2 +- .../alpm/ArchRepoSyncService.cpp | 4 +- .../infrastructure/alpm/ArchRepoSyncService.h | 3 +- .../email/EmailNotificationDispatcher.cpp | 34 ---- .../email/EmailNotificationDispatcher.h | 26 --- daemon/infrastructure/email/EmailOptions.h | 75 --------- .../web-controllers/AuthController.cpp | 2 +- daemon/swagger/CMakeLists.txt | 16 +- dbcli/CMakeLists.txt | 22 ++- web/CMakeLists.txt | 4 + 23 files changed, 382 insertions(+), 339 deletions(-) create mode 100644 CMakePresets.json delete mode 100644 cmake/FindYarn.cmake create mode 100644 cmake/bundled-deps.cmake create mode 100644 cmake/deps.cmake create mode 100644 conanfile.py delete mode 100644 conanfile.txt delete mode 100644 daemon/infrastructure/email/EmailNotificationDispatcher.cpp delete mode 100644 daemon/infrastructure/email/EmailNotificationDispatcher.h delete mode 100644 daemon/infrastructure/email/EmailOptions.h diff --git a/.vscode/settings.json b/.vscode/settings.json index 8b0fed8..92d8e81 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "clang-format.executable": "clang-format-17", - "clangd.path": "clangd-17", - "lldb-dap.executable-path": "/bin/lldb-vscode-17" + "clangd.path": "clangd-18", + "lldb-dap.executable-path": "/bin/lldb-dap-18" } diff --git a/CMakeLists.txt b/CMakeLists.txt index 242cd8b..dc83014 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ +################################################################################ +# CMake Configuration: Set up project and compiler settings +################################################################################ cmake_minimum_required(VERSION 3.23) -project(bxt CXX) +project(bxt C CXX) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}) @@ -9,49 +12,22 @@ set(CMAKE_CXX_STANDARD 23) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wall -Wextra") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi") +set(FETCHCONTENT_QUIET FALSE) -include(FetchContent) +################################################################################ +# Dependencies: Fetch and configure external libraries not available in Conan +################################################################################ +include("${CMAKE_SOURCE_DIR}/cmake/bundled-deps.cmake") -FetchContent_Declare( - lmdbxx - GIT_REPOSITORY https://github.com/hoytech/lmdbxx - GIT_TAG b12d1b12f4c9793aef8bed03d07ecbf789e810b4 -) -FetchContent_MakeAvailable(lmdbxx) +################################################################################ +# Dependencies: Configure dependencies available via Conan +################################################################################ +include("${CMAKE_SOURCE_DIR}/cmake/deps.cmake") -FetchContent_Declare( - event-bus - GIT_REPOSITORY https://github.com/gelldur/EventBus.git - GIT_TAG v3.0.3 -) - -FetchContent_GetProperties(event-bus) -if(NOT event-bus_POPULATED) - FetchContent_Populate(event-bus) - add_subdirectory(${event-bus_SOURCE_DIR}/lib ${event-bus_BINARY_DIR} EXCLUDE_FROM_ALL) -endif(NOT event-bus_POPULATED) - -FetchContent_Declare( - reflect-cpp - GIT_REPOSITORY https://github.com/getml/reflect-cpp.git - GIT_TAG v0.10.0 - GIT_PROGRESS TRUE -) -FetchContent_MakeAvailable(reflect-cpp) - -if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") - message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") - file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake" - "${CMAKE_BINARY_DIR}/conan.cmake" - TLS_VERIFY ON) -endif() - -include("${CMAKE_BINARY_DIR}/conan.cmake") -conan_cmake_run(CONANFILE conanfile.txt - BASIC_SETUP - PROFILE default - BUILD missing) +################################################################################ +# Project Structure: Add subdirectories for different components +################################################################################ add_subdirectory(daemon) add_subdirectory(web) add_subdirectory(dbcli) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..b6541cf --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,43 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "base", + "generator": "Ninja", + "hidden": true, + "binaryDir": "${sourceDir}/build/${presetName}", + "cacheVariables": { + "CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "/cmake-conan/conan_provider.cmake" + } + }, + { + "name": "debug", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "release", + "inherits": "base", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ], + "buildPresets": [ + { + "name": "debug", + "configurePreset": "debug" + }, + { + "name": "release", + "configurePreset": "release" + } + ] +} diff --git a/Dockerfile b/Dockerfile index 0ff2478..6033ea9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,75 +1,135 @@ +#syntax=docker/dockerfile:1.9 +################################################################################ # Base Stage: Prepare all dependencies and tools -FROM ubuntu:22.04 as base - -RUN apt-get update --yes && apt-get install --yes ca-certificates curl gnupg \ - && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" > /etc/apt/sources.list.d/llvm.list \ - && curl --silent --location https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ - && mkdir -p /etc/apt/keyrings \ - && curl --silent --location https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg \ - && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null \ - && apt-get update --yes \ - && apt-get install --yes build-essential git cmake libssl-dev pip ninja-build lldb-17 clangd-17 clang-format-17 clang-17 libc++-17-dev libc++abi-17-dev nodejs zstd unzip \ - && rm -rf /var/lib/apt/lists/* - -RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100 && \ - update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100 && \ - update-alternatives --install /usr/bin/cc cc /usr/bin/clang-17 100 && \ - update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-17 100 && \ - update-alternatives --set clang /usr/bin/clang-17 && \ - update-alternatives --set clang++ /usr/bin/clang++-17 && \ - update-alternatives --set cc /usr/bin/clang-17 && \ - update-alternatives --set c++ /usr/bin/clang++-17 - -RUN pip install conan==1.63.0 \ - && conan profile new default --detect \ - && conan profile update settings.compiler=clang default \ - && conan profile update settings.compiler.version=17 default \ - && conan profile update settings.compiler.libcxx=libc++ default +################################################################################ +FROM ubuntu:24.04 as base + +ENV DEBIAN_FRONTEND=noninteractive +RUN < /etc/apt/sources.list.d/llvm.list +echo "deb [signed-by=/etc/apt/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main" > /etc/apt/sources.list.d/kitware.list +apt-get update --yes +apt-get install --yes \ + build-essential \ + clang-18 \ + clang-format-18 \ + clangd-18 \ + cmake \ + curl \ + git \ + gnupg \ + libc++-18-dev \ + libc++abi-18-dev \ + libssl-dev \ + lldb-18 \ + ninja-build \ + nodejs \ + pipx \ + unzip \ + zstd +rm -rf /var/lib/apt/lists/* +EOF + +RUN <> /root/.conan2/profiles/default +compiler=clang +compiler.version=18 +compiler.libcxx=libc++ +compiler.cppstd=23 +EOF + +RUN git clone https://github.com/conan-io/cmake-conan.git -b develop2 /cmake-conan RUN curl -fsSL https://bun.sh/install | bash -ENV PATH="/root/.bun/bin:${PATH}" -COPY conanfile.txt /conan/ +COPY conanfile.py /conan/ +################################################################################ # Development Stage: Set up the development environment +################################################################################ FROM base as development -RUN conan install /conan -pr=default -s build_type=Debug --build=missing -g txt -of /conan -EXPOSE 8080 +RUN conan install /conan -pr=/root/.conan2/profiles/default -s build_type=Debug --build=missing -of /conan +# for main application +EXPOSE 8080 +# for web server +EXPOSE 3000 +################################################################################ # Production Build Stage: Build the application for production +################################################################################ FROM base as production-build -RUN conan install /conan -pr=default -s build_type=Release --build=missing -g txt -of /conan +RUN pipx ensurepath && conan install /conan -pr=default -s build_type=Release --build=missing -of /conan COPY ./ /src -RUN cmake -B/build -S/src -DCMAKE_BUILD_TYPE=Release -G Ninja \ - && cmake --build /build \ - && cp /src/configs/box.yml /build/bin/ \ - && cp /src/configs/config.toml /build/bin/ +RUN < /etc/apt/sources.list.d/llvm.list \ - && curl --silent --location https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ - && apt-get update && apt-get install --yes bzip2 xz-utils zlib1g liblz4-1 zstd libc++1-17 libc++abi1-17 \ - && rm -rf /var/lib/apt/lists/* +################################################################################ +FROM ubuntu:24.04 as production + +RUN < /etc/apt/sources.list.d/llvm.list +apt-get update --yes +apt-get install --yes \ + bzip2 \ + libc++1-18 \ + libc++abi1-18 \ + liblz4-1 \ + xz-utils \ + zlib1g \ + zstd +rm -rf /var/lib/apt/lists/* +EOF COPY --from=production-build /build/bin /app -RUN mkdir -p /app/persistence/ && \ - adduser --disabled-password --gecos '' bxt \ - && chown -R bxt:bxt /app \ - && chmod 755 /app - +RUN < ./bin/libs/ diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 751ee52..a84dc7f 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -1,29 +1,41 @@ +################################################################################ +# Project Configuration +################################################################################ cmake_minimum_required(VERSION 3.16) project(bxtd LANGUAGES CXX) +################################################################################ +# Dependencies and Sources +################################################################################ add_subdirectory(swagger) file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "*.cpp") +################################################################################ +# Executable Configuration +################################################################################ add_executable(${PROJECT_NAME} ${SOURCES}) -include_directories( - ./ +target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} ${CURL_INCLUDE_DIR} ${lmdbxx_SOURCE_DIR}/include ) -add_compile_definitions(${PROJECT_NAME} PRIVATE +target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_ASIO_HAS_CO_AWAIT=1 BOOST_ASIO_HAS_STD_COROUTINE=1 BOOST_LOG_DYN_LINK=1 - TOML_EXCEPTIONS=0) - -target_compile_options(${PROJECT_NAME} PUBLIC -fcoroutines) + TOML_EXCEPTIONS=0 +) target_link_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/bin) -target_link_libraries(${PROJECT_NAME} - ${CONAN_LIBS} +set_target_properties(${PROJECT_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" +) + +target_link_libraries(${PROJECT_NAME} PRIVATE + deps Dexode::EventBus reflectcpp ) diff --git a/daemon/application.cpp b/daemon/application.cpp index 2615403..cfe184e 100644 --- a/daemon/application.cpp +++ b/daemon/application.cpp @@ -69,10 +69,12 @@ toml::table setup_toml_configuration(std::filesystem::path const& config_path) { void setup_di_container(kgr::container& container) { using namespace bxt; - container.emplace(coro::io_scheduler::options { + auto scheduler = coro::io_scheduler::make_shared({ .thread_strategy = coro::io_scheduler::thread_strategy_t::manual, }); + container.emplace(scheduler); + container.service(); container.service(); @@ -252,6 +254,7 @@ int main() { auto& drogon_app = drogon::app() .setDocumentRoot("./web/") .registerPreRoutingAdvice(serveFrontendAdvice) + .enableCompressedRequest() .addListener("0.0.0.0", 8080) .setUploadPath("/tmp/bxt/") .setClientMaxBodySize(256 * 1024 * 1024) diff --git a/daemon/di.h b/daemon/di.h index 28b3116..ca8c8ff 100644 --- a/daemon/di.h +++ b/daemon/di.h @@ -72,7 +72,7 @@ namespace Utilities { : kgr::single_service> {}; - struct IOScheduler : kgr::shared_service {}; + struct IOScheduler : kgr::extern_shared_service {}; namespace LMDB { struct LMDBOptions : kgr::single_service {}; diff --git a/daemon/events.h b/daemon/events.h index c798c20..4c0d367 100644 --- a/daemon/events.h +++ b/daemon/events.h @@ -30,7 +30,7 @@ std::pair to_eventbus_visitor() { return {std::type_index(typeid(TEvent)), [](std::any event, std::shared_ptr evbus) { auto event_base = std::any_cast(event); - evbus->postpone(*(dynamic_cast(event_base))); + evbus->postpone(std::move(*(dynamic_cast(event_base)))); }}; } diff --git a/daemon/infrastructure/alpm/ArchRepoSyncService.cpp b/daemon/infrastructure/alpm/ArchRepoSyncService.cpp index 6cb1424..76a6e55 100644 --- a/daemon/infrastructure/alpm/ArchRepoSyncService.cpp +++ b/daemon/infrastructure/alpm/ArchRepoSyncService.cpp @@ -453,7 +453,7 @@ coro::task> } logw("Failed to download file: {}, retrying...", path); - co_await tp.yield_for(delay); + co_await tp->yield_for(delay); ++current_retry; } @@ -478,7 +478,7 @@ coro::task> using namespace std::chrono_literals; constexpr static auto timeout = 5s; - co_await tp.schedule(); + co_await tp->schedule(); auto client_ptr = std::make_unique(url); diff --git a/daemon/infrastructure/alpm/ArchRepoSyncService.h b/daemon/infrastructure/alpm/ArchRepoSyncService.h index a414d3d..9be72e6 100644 --- a/daemon/infrastructure/alpm/ArchRepoSyncService.h +++ b/daemon/infrastructure/alpm/ArchRepoSyncService.h @@ -85,7 +85,8 @@ class ArchRepoSyncService : public bxt::Core::Application::SyncService { UnitOfWorkBaseFactory& m_uow_factory; ArchRepoOptions m_options; - coro::io_scheduler tp {{.pool = {.thread_count = 1}}}; + std::shared_ptr tp = + coro::io_scheduler::make_shared({.pool = {.thread_count = 1}}); }; } // namespace bxt::Infrastructure diff --git a/daemon/infrastructure/email/EmailNotificationDispatcher.cpp b/daemon/infrastructure/email/EmailNotificationDispatcher.cpp deleted file mode 100644 index cd66f99..0000000 --- a/daemon/infrastructure/email/EmailNotificationDispatcher.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* === This file is part of bxt === - * - * SPDX-FileCopyrightText: 2022 Artem Grinev - * SPDX-License-Identifier: AGPL-3.0-or-later - * - */ -#include "EmailNotificationDispatcher.h" - -#include - -namespace bxt::Infrastructure { - -EmailNotificationDispatcher::EmailNotificationDispatcher() - : client(options.server_hostname, options.server_port) { - client.authenticate(options.connection_user, options.connection_password, - options.connection_auth_type()); -} - -void EmailNotificationDispatcher::dispatch(Core::Application::Notification const& notification) { - if (!notification.valid()) { - return; - } - - mailio::message msg; - - msg.subject(notification.title); - msg.content(notification.content); - - msg.sender({options.sender_name, options.sender_address}); - - client.submit(msg); -} - -} // namespace bxt::Infrastructure diff --git a/daemon/infrastructure/email/EmailNotificationDispatcher.h b/daemon/infrastructure/email/EmailNotificationDispatcher.h deleted file mode 100644 index eb3d112..0000000 --- a/daemon/infrastructure/email/EmailNotificationDispatcher.h +++ /dev/null @@ -1,26 +0,0 @@ -/* === This file is part of bxt === - * - * SPDX-FileCopyrightText: 2022 Artem Grinev - * SPDX-License-Identifier: AGPL-3.0-or-later - * - */ -#pragma once - -#include "core/application/notifications/NotificationDispatcherBase.h" -#include "infrastructure/email/EmailOptions.h" - -#include - -namespace bxt::Infrastructure { - -class EmailNotificationDispatcher : public Core::Application::NotificationDispatcherBase { -public: - EmailNotificationDispatcher(); - virtual void dispatch(Core::Application::Notification const& notification) override; - -private: - EmailOptions options; - mailio::smtps client; -}; - -} // namespace bxt::Infrastructure diff --git a/daemon/infrastructure/email/EmailOptions.h b/daemon/infrastructure/email/EmailOptions.h deleted file mode 100644 index 7b79757..0000000 --- a/daemon/infrastructure/email/EmailOptions.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === This file is part of bxt === - * - * SPDX-FileCopyrightText: 2022 Artem Grinev - * SPDX-License-Identifier: AGPL-3.0-or-later - * - */ -#pragma once - -#include "utilities/configuration/Configuration.h" - -#include -#include -#include -#include -#include - -namespace bxt::Infrastructure { -namespace { - static constexpr frozen::unordered_map - AuthType = { - {"none", mailio::smtps::auth_method_t::NONE}, - {"login", mailio::smtps::auth_method_t::LOGIN}, - {"starttls", mailio::smtps::auth_method_t::START_TLS}, - - }; -} // namespace - -struct EmailOptions { - std::string const _section = "email"; - - std::string server_hostname = "localhost"; - uint16_t server_port = 2222; - - mailio::smtps::auth_method_t connection_auth_type() { - return AuthType.at(frozen::string {connection_auth_type_string.c_str(), - connection_auth_type_string.size()}); - } - - std::string connection_auth_type_string = "none"; - std::string connection_user = "boxit"; - std::string connection_password = "1234"; - - std::string sender_name = "bxt daemon"; - std::string sender_address = "daemon@bxt.local"; - - void serialize(Utilities::Configuration& config) { - config.set("server-hostname", server_hostname); - - config.set("server-port", int64_t(server_port)); - - config.set("auth-type", connection_auth_type_string); - - config.set("user", connection_user); - config.set("password", connection_password); - - config.set("sender-name", sender_name); - config.set("sender-address", sender_address); - } - - void deserialize(Utilities::Configuration const& config) { - server_hostname = config.get("server-hostname").value_or(server_hostname); - - server_port = config.get("server-port").value_or(server_port); - - connection_auth_type_string = - config.get("auth-type").value_or(connection_auth_type_string); - - connection_user = config.get("user").value_or(connection_user); - connection_password = config.get("password").value_or(connection_password); - sender_name = config.get("sender-name").value_or(sender_name); - sender_address = config.get("sender-address").value_or(sender_address); - } -}; - -} // namespace bxt::Infrastructure diff --git a/daemon/presentation/web-controllers/AuthController.cpp b/daemon/presentation/web-controllers/AuthController.cpp index 0ef3896..204d6cd 100644 --- a/daemon/presentation/web-controllers/AuthController.cpp +++ b/daemon/presentation/web-controllers/AuthController.cpp @@ -40,7 +40,7 @@ drogon::Task AuthController::auth(drogon::HttpRequestPt response_type = Token::Storage::Cookie; } else { co_return drogon_helpers::make_error_response( - fmt::format("Invalid response type: {}", response_type)); + fmt::format("Invalid response type: {}", response_type_name)); } auto const check_ok = co_await m_service.auth(name, password); diff --git a/daemon/swagger/CMakeLists.txt b/daemon/swagger/CMakeLists.txt index 76f4b10..a0c7eac 100644 --- a/daemon/swagger/CMakeLists.txt +++ b/daemon/swagger/CMakeLists.txt @@ -1,13 +1,18 @@ +################################################################################ +# Swagger UI Fetching and Deployment +################################################################################ FetchContent_Declare( swagger-ui GIT_REPOSITORY https://github.com/swagger-api/swagger-ui.git GIT_TAG v5.15.2 + EXCLUDE_FROM_ALL + GIT_PROGRESS TRUE + SOURCE_SUBDIR non_existent_subdir # Prevent FetchContent_MakeAvailable() from calling add_subdirectory() + # https://discourse.cmake.org/t/fetchcontent-a-directory-but-add-a-subdirectory/8603/15 ) -FetchContent_GetProperties(swagger-ui) -if(NOT swagger-ui_POPULATED) - FetchContent_Populate(swagger-ui) -endif(NOT swagger-ui_POPULATED) + +FetchContent_MakeAvailable(swagger-ui) add_custom_target( deploy_swagger @@ -18,4 +23,5 @@ add_custom_target( -DLIST_DIR=${CMAKE_CURRENT_LIST_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DBXT_BASE_PATH=${BXT_BASE_URL} - -P "${CMAKE_CURRENT_LIST_DIR}/configure_files.cmake") + -P "${CMAKE_CURRENT_LIST_DIR}/configure_files.cmake" +) diff --git a/dbcli/CMakeLists.txt b/dbcli/CMakeLists.txt index 175a09b..cef643f 100644 --- a/dbcli/CMakeLists.txt +++ b/dbcli/CMakeLists.txt @@ -1,11 +1,23 @@ +################################################################################ +# Set up dbcli utility +################################################################################ + add_executable( dbcli - dbcli.cpp ../daemon/core/domain/enums/PoolLocation.cpp - ../daemon/utilities/alpmdb/Desc.cpp ../daemon/utilities/alpmdb/PkgInfo.cpp + dbcli.cpp + ../daemon/core/domain/enums/PoolLocation.cpp + ../daemon/utilities/alpmdb/Desc.cpp + ../daemon/utilities/alpmdb/PkgInfo.cpp ../daemon/utilities/alpmdb/DescFormatter.cpp - ../daemon/utilities/libarchive/Reader.cpp) + ../daemon/utilities/libarchive/Reader.cpp +) -target_link_libraries(dbcli PRIVATE ${CONAN_LIBS}) +target_link_libraries(dbcli PRIVATE deps) target_include_directories( - dbcli PRIVATE ${CURL_INCLUDE_DIR} ${lmdbxx_SOURCE_DIR}/include ../daemon/) + dbcli + PRIVATE + ${CURL_INCLUDE_DIR} + ${lmdbxx_SOURCE_DIR}/include + ../daemon +) diff --git a/web/CMakeLists.txt b/web/CMakeLists.txt index 0e395ce..23797f2 100644 --- a/web/CMakeLists.txt +++ b/web/CMakeLists.txt @@ -1,3 +1,7 @@ +################################################################################ +# Set up Vite project +################################################################################ + find_package(Bun REQUIRED) bun_add_vite_project(bxt-web ${CMAKE_CURRENT_LIST_DIR})