Included yaml-cpp dependency in preparation for switch to YAML format for configuration files

This commit is contained in:
Nav
2022-07-23 02:28:41 +01:00
parent 43f33a2e77
commit cf0a103ba4
2 changed files with 11 additions and 0 deletions

View File

@@ -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)

View File

@@ -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.