Skip to content

Commit

Permalink
Remove dependency on fmt library. Replace with wxWidgets' `wxString::…
Browse files Browse the repository at this point in the history
…Format`.
  • Loading branch information
mross-ua committed Jul 30, 2024
1 parent 7ffab91 commit d61b98d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ configure_file(
"${CMAKE_BINARY_DIR}/include/app_config.hpp"
)

find_package(fmt CONFIG REQUIRED)

find_package(OpenGL REQUIRED)
find_package(wxWidgets CONFIG REQUIRED COMPONENTS core base gl)

Expand Down
2 changes: 1 addition & 1 deletion src/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ target_include_directories(${PROJECT_NAME}

target_link_libraries(${PROJECT_NAME}
PRIVATE
fmt::fmt
wx::core
oatpp::oatpp
)
8 changes: 4 additions & 4 deletions src/config/Config.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <string>
#include <string_view>

#include <fmt/core.h>
#include <wx/string.h>

#include "oatpp/core/async/Coroutine.hpp"
#include "oatpp/core/data/stream/FileStream.hpp"
Expand All @@ -27,7 +27,7 @@ namespace kdeck

if (!xdgConfigHome.empty())
{
m_filePath = fmt::format("{}/{}/{}", xdgConfigHome, kProjectName, kConfigFilename);
m_filePath = wxString::Format("%s/%s/%s", xdgConfigHome, kProjectName, kConfigFilename);
}
else
{
Expand All @@ -37,11 +37,11 @@ namespace kdeck
{
//TODO prefer .config/ directory if it exists

m_filePath = fmt::format("{}/{}/{}", home, kProjectName, kConfigFilename);
m_filePath = wxString::Format("%s/%s/%s", home, kProjectName, kConfigFilename);
}
else
{
m_filePath = fmt::format("{}/{}", kProjectName, kConfigFilename);
m_filePath = wxString::Format("%s/%s", kProjectName, kConfigFilename);
}
}

Expand Down
1 change: 0 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.2.0",
"builtin-baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625",
"dependencies": [
"fmt",
"oatpp",
"oatpp-openssl",
"wxwidgets"
Expand Down

0 comments on commit d61b98d

Please sign in to comment.