Skip to content

Commit e51338e

Browse files
Merge pull request #68 from themuffinator/codex/find-method-to-reduce-dll-file-size
Reduce release DLL size by using header-only fmt
2 parents 6db605b + 24061a3 commit e51338e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/game.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<FunctionLevelLinking>true</FunctionLevelLinking>
9090
<IntrinsicFunctions>true</IntrinsicFunctions>
9191
<SDLCheck>true</SDLCheck>
92-
<PreprocessorDefinitions>KEX_Q2_GAME;KEX_Q2GAME_EXPORTS;NO_FMT_SOURCE;KEX_Q2GAME_DYNAMIC;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
<PreprocessorDefinitions>KEX_Q2_GAME;KEX_Q2GAME_EXPORTS;NO_FMT_SOURCE;FMT_HEADER_ONLY;KEX_Q2GAME_DYNAMIC;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9393
<ConformanceMode>true</ConformanceMode>
9494
<LanguageStandard>stdcpp17</LanguageStandard>
9595
<DisableSpecificWarnings>4267;4244</DisableSpecificWarnings>

src/q_std.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
namespace fmt = std;
3434
#define FMT_STRING(s) s
3535
#else
36+
#ifndef FMT_HEADER_ONLY
37+
#define FMT_HEADER_ONLY 1
38+
#endif
3639
#include <fmt/format.h>
3740
#endif
3841

0 commit comments

Comments
 (0)