diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2023-09-06 21:09:29 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2023-09-06 21:09:29 +0200 |
| commit | 4c68156184be63e75f54f5b8b06a640d7d2a497a (patch) | |
| tree | 0b97b651d1a0b4c5742e561b3a345da7e145f669 /source/lib | |
| parent | 17a3bb9337fd7e4a57354ed5359e449d5ab1388c (diff) | |
| download | wanda-4c68156184be63e75f54f5b8b06a640d7d2a497a.tar.xz wanda-4c68156184be63e75f54f5b8b06a640d7d2a497a.zip | |
deps: remove asio remnants and fix fmt
Diffstat (limited to 'source/lib')
| -rw-r--r-- | source/lib/control/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | source/lib/proto/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | source/lib/proto/include/wanda/proto/message.hpp | 4 | ||||
| -rw-r--r-- | source/lib/proto/src/message.cpp | 4 | ||||
| -rw-r--r-- | source/lib/system/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | source/lib/system/src/wallpaper.cpp | 10 |
6 files changed, 15 insertions, 16 deletions
diff --git a/source/lib/control/CMakeLists.txt b/source/lib/control/CMakeLists.txt index ce1a9da..2fce909 100644 --- a/source/lib/control/CMakeLists.txt +++ b/source/lib/control/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_path(GET CMAKE_CURRENT_SOURCE_DIR STEM LIB_NAME) file(GLOB_RECURSE LIB_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.hpp") file(GLOB_RECURSE LIB_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.cpp") -find_package("asio" REQUIRED) +find_package("Boost" REQUIRED COMPONENTS "headers") find_package("spdlog" REQUIRED) add_library("wanda-${LIB_NAME}" @@ -33,6 +33,7 @@ target_link_libraries("wanda-${LIB_NAME}" PUBLIC "wanda::proto" "wanda::system" + "Boost::headers" "spdlog::spdlog_header_only" ) diff --git a/source/lib/proto/CMakeLists.txt b/source/lib/proto/CMakeLists.txt index 53aeb43..cc218ba 100644 --- a/source/lib/proto/CMakeLists.txt +++ b/source/lib/proto/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_path(GET CMAKE_CURRENT_SOURCE_DIR STEM LIB_NAME) file(GLOB_RECURSE LIB_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.hpp") file(GLOB_RECURSE LIB_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.cpp") -find_package("fmt" REQUIRED) +find_package("spdlog") add_library("wanda-${LIB_NAME}" ${LIB_SOURCES} @@ -28,7 +28,7 @@ target_compile_features("wanda-${LIB_NAME}" PUBLIC ) target_link_libraries("wanda-${LIB_NAME}" PUBLIC - "fmt::fmt-header-only" + "spdlog::spdlog_header_only" ) install(TARGETS "wanda-${LIB_NAME}" diff --git a/source/lib/proto/include/wanda/proto/message.hpp b/source/lib/proto/include/wanda/proto/message.hpp index f4a6a3b..03a30c2 100644 --- a/source/lib/proto/include/wanda/proto/message.hpp +++ b/source/lib/proto/include/wanda/proto/message.hpp @@ -7,7 +7,7 @@ #ifndef WANDA_PROTO_MESSAGE_HPP #define WANDA_PROTO_MESSAGE_HPP -#include <fmt/core.h> +#include <spdlog/common.h> #include <cstddef> #include <istream> @@ -76,7 +76,7 @@ namespace wanda::proto } // namespace wanda::proto template<> -struct fmt::formatter<wanda::proto::message> : fmt::formatter<std::string> +struct spdlog::fmt_lib::formatter<wanda::proto::message> : spdlog::fmt_lib::formatter<std::string> { auto format(wanda::proto::message const & message, format_context & context) const -> decltype(context.out()); }; diff --git a/source/lib/proto/src/message.cpp b/source/lib/proto/src/message.cpp index dad3e86..f44ca06 100644 --- a/source/lib/proto/src/message.cpp +++ b/source/lib/proto/src/message.cpp @@ -1,6 +1,6 @@ #include "wanda/proto/message.hpp" -#include <fmt/format.h> +#include <spdlog/common.h> #include <ios> #include <iterator> @@ -76,7 +76,7 @@ namespace wanda::proto } // namespace wanda::proto -auto fmt::formatter<wanda::proto::message>::format(wanda::proto::message const & message, format_context & context) const -> decltype(context.out()) +auto spdlog::fmt_lib::formatter<wanda::proto::message>::format(wanda::proto::message const & message, format_context & context) const -> decltype(context.out()) { return formatter<std::string>::format(static_cast<std::string>(message), context); } diff --git a/source/lib/system/CMakeLists.txt b/source/lib/system/CMakeLists.txt index 6b65f4b..6b7ce7c 100644 --- a/source/lib/system/CMakeLists.txt +++ b/source/lib/system/CMakeLists.txt @@ -3,8 +3,7 @@ cmake_path(GET CMAKE_CURRENT_SOURCE_DIR STEM LIB_NAME) file(GLOB_RECURSE LIB_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.hpp") file(GLOB_RECURSE LIB_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" CONFIGURE_DEPENDS "**/*.cpp") -find_package("Boost" REQUIRED) -find_package("fmt" REQUIRED) +find_package("Boost" REQUIRED COMPONENTS "headers") find_package("JPEG" REQUIRED) find_package("PNG" REQUIRED) find_package("spdlog" REQUIRED) @@ -51,8 +50,7 @@ target_link_libraries("wanda-${LIB_NAME}" PUBLIC "wanda::meta" "wanda::std_ext" - "boost::boost" - "fmt::fmt-header-only" + "Boost::headers" "JPEG::JPEG" "PNG::PNG" "spdlog::spdlog_header_only" diff --git a/source/lib/system/src/wallpaper.cpp b/source/lib/system/src/wallpaper.cpp index ebb8bd7..11a6402 100644 --- a/source/lib/system/src/wallpaper.cpp +++ b/source/lib/system/src/wallpaper.cpp @@ -10,7 +10,7 @@ #include <boost/gil/extension/io/png.hpp> #include <boost/gil/extension/numeric/resample.hpp> #include <boost/gil/extension/numeric/sampler.hpp> -#include <fmt/format.h> +#include <spdlog/fmt/fmt.h> #include <algorithm> #include <cmath> @@ -67,10 +67,10 @@ namespace wanda::system auto image = load_image(wallpaper); auto color = average_colors(std::move(image)); - auto hexstring = fmt::format("#{:02X}{:02X}{:02X}", - static_cast<std::uint8_t>(at_c<0>(color)), - static_cast<std::uint8_t>(at_c<1>(color)), - static_cast<std::uint8_t>(at_c<2>(color))); + auto hexstring = spdlog::fmt_lib::format("#{:02X}{:02X}{:02X}", + static_cast<std::uint8_t>(at_c<0>(color)), + static_cast<std::uint8_t>(at_c<1>(color)), + static_cast<std::uint8_t>(at_c<2>(color))); with("org.gnome.desktop.background"_setting, [&](auto & setting) { with(setting["primary-color"_key], [&](auto & value) { |
