Skip to content

Commit 4247cf0

Browse files
committed
Remove fmt library dependency
1 parent 9ea5a2e commit 4247cf0

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

demos/demo_imgui/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ add_project_meta(META_FILES_TO_INCLUDE IS_IMGUI)
1111

1212
find_package(tinyfiledialogs CONFIG REQUIRED)
1313
find_package(SDL2 CONFIG REQUIRED)
14-
find_package(clipp CONFIG REQUIRED)
1514
find_package(imgui CONFIG REQUIRED)
1615
find_package(gl3w CONFIG REQUIRED)
1716
find_package(Freetype CONFIG REQUIRED)
18-
find_package(fmt CONFIG REQUIRED)
1917

2018
include(CMakePackageConfigHelpers)
2119

@@ -80,7 +78,6 @@ target_link_libraries (${DEMO_NAME}
8078
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>
8179
imgui::imgui
8280
unofficial::gl3w::gl3w
83-
fmt::fmt-header-only
8481
tinyfiledialogs::tinyfiledialogs
8582
${PLATFORM_LINKLIBS}
8683
)

demos/demo_imgui/janet_utils.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <sstream>
22
#include <string>
33

4-
#include <fmt/format.h>
5-
64
#include <zep/mcommon/logger.h>
75

86
#include "janet.h"
@@ -123,7 +121,7 @@ std::string janet_run(const std::string& strText, const std::string& strPathIn,
123121
{
124122
janet_stacktrace(cres.macrofiber, janet_wrap_string(cres.error));
125123
}
126-
strOut << fmt::format("{}", (const char*)cres.error) << std::endl;
124+
strOut << std::string((const char*)cres.error) << std::endl;
127125
errflags |= 0x02;
128126
done = 1;
129127
}
@@ -137,7 +135,7 @@ std::string janet_run(const std::string& strText, const std::string& strPathIn,
137135
break;
138136
case JANET_PARSE_ERROR:
139137
errflags |= 0x04;
140-
strOut << fmt::format("Parse Error {}", janet_parser_error(&parser)) << std::endl;
138+
strOut << "Parse Error " << std::string(janet_parser_error(&parser)) << std::endl;
141139
done = 1;
142140
break;
143141
case JANET_PARSE_PENDING:

prebuild.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if not exist "vcpkg\vcpkg.exe" (
1717
echo Installing libraries for the demo...
1818
cd vcpkg
1919
echo Installing Libraries
20-
vcpkg install fmt imgui[freetype,sdl2-binding,opengl3-binding] tinyfiledialogs gl3w freetype sdl2 --triplet x64-windows-static-md --recurse
20+
vcpkg install imgui[freetype,sdl2-binding,opengl3-binding] tinyfiledialogs gl3w freetype sdl2 --triplet x64-windows-static-md --recurse
2121
cd %~dp0
2222

2323
echo %Time%

prebuild.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ "$(uname)" == "Darwin" ]; then
1414
fi
1515

1616
cd vcpkg
17-
./vcpkg install fmt imgui[freetype,sdl2-binding,opengl3-binding] tinyfiledialogs gl3w freetype sdl2 --triplet ${triplet[0]} --recurse
17+
./vcpkg install imgui[freetype,sdl2-binding,opengl3-binding] tinyfiledialogs gl3w freetype sdl2 --triplet ${triplet[0]} --recurse
1818
if [ "$(uname)" != "Darwin" ]; then
1919
./vcpkg install glib --triplet ${triplet[0]} --recurse
2020
fi

0 commit comments

Comments
 (0)