From cf0a103ba45c247fd498ac60cf4da8a5a7896a3f Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 23 Jul 2022 02:28:41 +0100 Subject: [PATCH] Included yaml-cpp dependency in preparation for switch to YAML format for configuration files --- CMakeLists.txt | 3 +++ README.md | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60bad696..dda74163 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ set(CMAKE_AUTOMOC ON) set(AUTOGEN_BUILD_DIR ../build/) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/build/bin") +find_package(yaml-cpp 0.7.0 REQUIRED) find_package(Qt6Core REQUIRED) find_package(Qt6Gui REQUIRED) find_package(Qt6Widgets REQUIRED) @@ -80,6 +81,7 @@ add_subdirectory(src) set_target_properties(Bloom PROPERTIES OUTPUT_NAME bloom) target_include_directories(Bloom PUBLIC ./) +target_include_directories(Bloom PUBLIC ${YAML_CPP_INCLUDE_DIR}) if (${CMAKE_BUILD_TYPE} MATCHES "Debug") # When Qt isn't playing nice, it's very useful to have access to the Qt source code, to step through. @@ -93,6 +95,7 @@ target_link_libraries(Bloom -lstdc++fs) target_link_libraries(Bloom -lpthread) target_link_libraries(Bloom -lusb-1.0) target_link_libraries(Bloom -lhidapi-libusb) +target_link_libraries(Bloom ${YAML_CPP_LIBRARIES}) target_link_libraries(Bloom Qt6::Core) target_link_libraries(Bloom Qt6::Gui) target_link_libraries(Bloom Qt6::UiTools) diff --git a/README.md b/README.md index 40d4faa0..43e6e717 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,14 @@ Also, build-essential (`sudo apt-get install build-essential`). #### libusb v1.0 & libhidapi `sudo apt-get install libusb-1.0-0-dev libhidapi-dev` +#### yaml-cpp (version 0.7.0 or later) +I had to build this from source as I'm on Ubuntu 20.04 LTS, which only hosts version 0.6.2 on the package repository. +It seems that since Ubuntu 22.04 LTS/Debian 12, there is a package for version 0.7.0 (see +https://packages.ubuntu.com/source/jammy/yaml-cpp and https://packages.debian.org/bookworm/libyaml-cpp-dev). +`sudo apt-get install libyaml-cpp-dev` should work if your package repository hosts version 0.7.0 or later. If not, you +can build the library from source by following the instructions at https://github.com/jbeder/yaml-cpp#readme. Be sure +to configure the build with `-DYAML_BUILD_SHARED_LIBS=ON`, to build the shared object binaries. + #### PHP version 8 or later, with the xml extension Some of Bloom's build scripts are written in PHP.