aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conan.lock6
-rw-r--r--conanfile.py35
-rw-r--r--source/app/CMakeLists.txt3
-rw-r--r--source/lib/control/CMakeLists.txt3
-rw-r--r--source/lib/proto/CMakeLists.txt4
-rw-r--r--source/lib/proto/include/wanda/proto/message.hpp4
-rw-r--r--source/lib/proto/src/message.cpp4
-rw-r--r--source/lib/system/CMakeLists.txt6
-rw-r--r--source/lib/system/src/wallpaper.cpp10
-rw-r--r--source/tests/CMakeLists.txt2
-rw-r--r--source/tests/lib/system/CMakeLists.txt2
-rw-r--r--test_package/conanfile.py1
12 files changed, 38 insertions, 42 deletions
diff --git a/conan.lock b/conan.lock
index 35cca80..2a52f61 100644
--- a/conan.lock
+++ b/conan.lock
@@ -6,14 +6,18 @@
"lyra/1.6.1#b06c2dcfbc5c7aaed53c2d89f3ba0c9f%1692629912.174",
"libpng/1.6.40#3b63a2aa000933a57a53322207790714%1687968865.34",
"libjpeg-turbo/3.0.0#67120951a18ea4925927f812ead966ed%1688830880.079",
+ "libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c%1676205469.545",
"fmt/10.1.0#51d8d1db43672712db81b146a85ca73d%1692421582.103",
"catch2/3.4.0#eb6f89bbc70b6b3d8748d21ab8fb9468%1689302336.925",
+ "bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d%1678293522.814",
"boost/1.83.0#8be129e9ab6e00b3d74810626cdbea9c%1692735825.011",
+ "boost/1.82.0#55e821ec1f19367b6f0db13ea73948d3%1692735825.716",
"asio/1.28.1#9b4fb4d434f6b12dc44c116b57f6e25d%1691066750.28"
],
"build_requires": [
"nasm/2.15.05#ca1c14c2060af0ec151048b54ced9262%1692882544.152",
- "cmake/3.27.4#a7e78418b024dccacccc887f049f47ed%1693515860.005"
+ "cmake/3.27.4#a7e78418b024dccacccc887f049f47ed%1693515860.005",
+ "b2/4.9.6#53783bdbbdbb6c13732b25f1f6ea6c58%1686399756.948"
],
"python_requires": []
} \ No newline at end of file
diff --git a/conanfile.py b/conanfile.py
index 9e89939..5023db5 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -26,28 +26,28 @@ class Wanda(ConanFile):
"build_type",
)
exports_sources = ("source/*",)
- requires = (
- "boost/[~1.83]",
- "libjpeg-turbo/[~3.0]",
- "libpng/[~1.6]",
- "lyra/[~1.6]",
- "spdlog/[~1.12]",
- )
test_requires = ("catch2/[>=3.4]",)
tool_requires = ("cmake/[>=3.27]",)
+ def requirements(self):
+ self.requires("boost/[~1.83]", transitive_headers=True, options={
+ "asio_no_deprecated": True,
+ "system_no_deprecated": True,
+ "header_only": True,
+ })
+ self.requires("libjpeg-turbo/[~3.0]")
+ self.requires("libpng/[~1.6]")
+ self.requires("lyra/[~1.6]")
+ self.requires("spdlog/[~1.12]", transitive_headers=True, options={
+ "header_only": True,
+ })
+
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
cmake.test(env="CTEST_OUTPUT_ON_FAILURE=1")
- def configure(self):
- self.options["boost"].asio_no_deprecated = True
- self.options["boost"].header_only = True
- self.options["fmt"].header_only = True
- self.options["spdlog"].header_only = True
-
def generate(self):
toolchain = CMakeToolchain(self)
toolchain.variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True
@@ -70,14 +70,14 @@ class Wanda(ConanFile):
"std_ext",
"system",
# requires
- "asio::asio",
+ "boost::headers",
"spdlog::spdlog",
]
self.cpp_info.components["meta"].libs = []
self.cpp_info.components["proto"].libs = ["wanda-proto"]
- self.cpp_info.components["proto"].requires = ["fmt::fmt"]
+ self.cpp_info.components["proto"].requires = ["spdlog::spdlog",]
self.cpp_info.components["std_ext"].libs = []
@@ -86,8 +86,7 @@ class Wanda(ConanFile):
"meta",
"std_ext",
# requires
- "boost::boost",
- "fmt::fmt",
+ "boost::headers",
"libjpeg-turbo::jpeg",
"libpng::libpng",
"spdlog::spdlog",
@@ -99,7 +98,6 @@ class Wanda(ConanFile):
"proto",
"system",
# requires
- "asio::asio",
"lyra::lyra",
"spdlog::spdlog",
]
@@ -114,7 +112,6 @@ class Wanda(ConanFile):
"std_ext",
"system",
# requires
- "asio::asio",
"lyra::lyra",
"spdlog::spdlog",
]
diff --git a/source/app/CMakeLists.txt b/source/app/CMakeLists.txt
index f2c69e8..175a901 100644
--- a/source/app/CMakeLists.txt
+++ b/source/app/CMakeLists.txt
@@ -2,7 +2,6 @@ include("CheckIPOSupported")
check_ipo_supported(RESULT "WANDA_IPO_SUPPORTED")
-find_package("Boost")
find_package("lyra")
find_package("spdlog")
@@ -17,7 +16,6 @@ target_link_libraries("${PROJECT_NAME}c" PRIVATE
"wanda::proto"
"wanda::system"
- "Boost::boost"
"bfg::lyra"
"spdlog::spdlog_header_only"
)
@@ -42,7 +40,6 @@ target_link_libraries("wandad" PRIVATE
"wanda::std_ext"
"wanda::system"
- "Boost::boost"
"bfg::lyra"
"spdlog::spdlog_header_only"
)
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) {
diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt
index 110c864..bf49461 100644
--- a/source/tests/CMakeLists.txt
+++ b/source/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package("Catch2")
+find_package("Catch2" REQUIRED COMPONENTS "Catch2WithMain")
include("Catch")
diff --git a/source/tests/lib/system/CMakeLists.txt b/source/tests/lib/system/CMakeLists.txt
index ba0ff1a..a33c495 100644
--- a/source/tests/lib/system/CMakeLists.txt
+++ b/source/tests/lib/system/CMakeLists.txt
@@ -2,7 +2,7 @@ add_executable("wanda-tests-system"
"src/xdg.cpp"
)
-target_link_libraries("wanda-tests-system"
+target_link_libraries("wanda-tests-system" PRIVATE
"wanda::system"
"Catch2::Catch2WithMain"
diff --git a/test_package/conanfile.py b/test_package/conanfile.py
index 945bebf..6c01007 100644
--- a/test_package/conanfile.py
+++ b/test_package/conanfile.py
@@ -11,7 +11,6 @@ class WandaTestConan(ConanFile):
def requirements(self):
self.requires(self.tested_reference_str)
- self.requires("asio/[~1.28]")
def build(self):
cmake = CMake(self)