Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libfmt #7457

Merged
merged 4 commits into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions 3rdParty/libfmt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,24 @@ else()
endif()
include(FetchContent)
FetchContent_Declare(libfmt
URL https://github.com/fmtlib/fmt/archive/92227c77a4eed4c12f97f7916041ace4d5ca02d4.tar.gz
URL_HASH MD5=a60bc215a81a4ba770a7c1936311612f
URL https://github.com/fmtlib/fmt/archive/02537548f3a9efb5f3b83755acf50c8a16ba58c8.tar.gz
URL_HASH MD5=6901c6945cd311117d96baaa6d067380
)
FetchContent_MakeAvailableExcludeFromAll(libfmt)

# We do not use locale-specific features of libfmt and disabling them reduces the size.
target_compile_definitions(fmt PUBLIC FMT_USE_LOCALE=0)

if(DEVILUTIONX_WINDOWS_NO_WCHAR)
target_compile_definitions(fmt PUBLIC FMT_USE_WRITE_CONSOLE)
endif()

# Reduces the overall binary size by 8 KiB.
if(TARGET_PLATFORM STREQUAL "rg99")
target_compile_definitions(fmt PUBLIC FMT_BUILTIN_TYPES=0)
endif()

# https://github.com/fmtlib/fmt/issues/4189
if(NINTENDO_3DS OR NINTENDO_SWITCH OR VITA)
target_compile_definitions(fmt PUBLIC FMT_USE_FALLBACK_FILE=1)
endif()
Loading