diff options
Diffstat (limited to 'source/lib/system')
| -rw-r--r-- | source/lib/system/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | source/lib/system/src/wallpaper.cpp | 10 |
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) { |
