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

Bump libfmt #6585

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions 3rdParty/libfmt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
add_definitions(-D_POSIX_C_SOURCE=200809L)
endif()

# Disable fmt/os.h functionality.
# We do not use it and it is not supported on some systems.
set(FMT_OS OFF)

if(DEVILUTIONX_STATIC_LIBFMT)
set(BUILD_SHARED_LIBS OFF)
else()
Expand All @@ -19,8 +23,8 @@ if(NXDK)
)
else()
FetchContent_Declare(libfmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/10.0.0.tar.gz
URL_HASH MD5=fa629bc1178918b7af4b2ea6b6a271dc
URL https://github.com/fmtlib/fmt/archive/refs/tags/10.1.1.tar.gz
URL_HASH MD5=0d41a16f1b3878d44e6fd7ff1f6cc45a
)
endif()
FetchContent_MakeAvailableExcludeFromAll(libfmt)
9 changes: 9 additions & 0 deletions Source/dvlnet/tcp_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
#include <memory>
#include <string>

// This header must be included before any 3DS code
// because 3DS SDK defines a macro with the same name
// as an fmt template parameter in some versions of fmt.
// See https://github.com/fmtlib/fmt/issues/3632
//
// 3DS uses some custom ASIO code that transitively includes
// the 3DS SDK.
#include <fmt/core.h>

#include <asio/ts/buffer.hpp>
#include <asio/ts/internet.hpp>
#include <asio/ts/io_context.hpp>
Expand Down
9 changes: 9 additions & 0 deletions Source/dvlnet/tcp_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#include <memory>
#include <string>

// This header must be included before any 3DS code
// because 3DS SDK defines a macro with the same name
// as an fmt template parameter in some versions of fmt.
// See https://github.com/fmtlib/fmt/issues/3632
//
// 3DS uses some custom ASIO code that transitively includes
// the 3DS SDK.
#include <fmt/core.h>

#include <asio/ts/buffer.hpp>
#include <asio/ts/internet.hpp>
#include <asio/ts/io_context.hpp>
Expand Down
6 changes: 6 additions & 0 deletions Source/platform/ctr/sockets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
#include <cstdint>
#include <malloc.h>

// This header must be included before any 3DS code
// because 3DS SDK defines a macro with the same name
// as an fmt template parameter in some versions of fmt.
// See https://github.com/fmtlib/fmt/issues/3632
#include <fmt/core.h>

#include <3ds.h>

#include "utils/log.hpp"
Expand Down