diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | src/common/logger.cpp | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 6e621bf1..43d1dedb 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -6,7 +6,6 @@ target_sources(cru_base PUBLIC ${CRU_BASE_INCLUDE_DIR}/base.hpp ${CRU_BASE_INCLUDE_DIR}/bitmask.hpp ${CRU_BASE_INCLUDE_DIR}/event.hpp - ${CRU_BASE_INCLUDE_DIR}/format.hpp ${CRU_BASE_INCLUDE_DIR}/logger.hpp ${CRU_BASE_INCLUDE_DIR}/pre_config.hpp ${CRU_BASE_INCLUDE_DIR}/self_resolvable.hpp @@ -14,5 +13,6 @@ target_sources(cru_base PUBLIC target_include_directories(cru_base PUBLIC ${CRU_INCLUDE_DIR}) target_compile_definitions(cru_base PUBLIC $<$<CONFIG:Debug>:CRU_DEBUG>) -find_path(GSL_INCLUDE_DIR NAMES gsl PATH_SUFFIXES ms-gsl) -target_include_directories(cru_base PUBLIC ${GSL_INCLUDE_DIR}) +find_package(Microsoft.GSL CONFIG REQUIRED) +find_package(fmt CONFIG REQUIRED) +target_link_libraries(cru_base PUBLIC Microsoft.GSL::GSL fmt::fmt) diff --git a/src/common/logger.cpp b/src/common/logger.cpp index 6c1422f9..97599b0a 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -1,7 +1,5 @@ #include "cru/common/logger.hpp" -#include "cru/common/format.hpp" - #include <array> #include <cstdlib> #include <ctime> @@ -60,8 +58,8 @@ void Logger::Log(LogLevel level, const std::string_view &s) { std::array<char, 50> buffer; std::strftime(buffer.data(), 50, "%c", std::localtime(&now)); - source->Write(level, util::Format("[{}] {}: {}\n", buffer.data(), - LogLevelToString(level), s)); + source->Write(level, fmt::format("[{}] {}: {}\n", buffer.data(), + LogLevelToString(level), s)); } } } // namespace cru::log |
