aboutsummaryrefslogtreecommitdiff
path: root/source/lib/system
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2023-09-06 21:09:29 +0200
committerFelix Morgner <felix.morgner@gmail.com>2023-09-06 21:09:29 +0200
commit4c68156184be63e75f54f5b8b06a640d7d2a497a (patch)
tree0b97b651d1a0b4c5742e561b3a345da7e145f669 /source/lib/system
parent17a3bb9337fd7e4a57354ed5359e449d5ab1388c (diff)
downloadwanda-4c68156184be63e75f54f5b8b06a640d7d2a497a.tar.xz
wanda-4c68156184be63e75f54f5b8b06a640d7d2a497a.zip
deps: remove asio remnants and fix fmt
Diffstat (limited to 'source/lib/system')
-rw-r--r--source/lib/system/CMakeLists.txt6
-rw-r--r--source/lib/system/src/wallpaper.cpp10
2 files changed, 7 insertions, 9 deletions
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) {