From 720e69dc9c3537f447a41d478e4009cc1f69b57f Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sat, 16 Jul 2022 09:33:33 +0100 Subject: [PATCH] Xbox NXDK: Use diasurgical fork of libfmt --- 3rdParty/libfmt/CMakeLists.txt | 16 ++++++++++++---- CMake/platforms/xbox_nxdk.cmake | 1 + CMake/platforms/xbox_nxdk/finders/Findfmt.cmake | 5 ----- 3 files changed, 13 insertions(+), 9 deletions(-) delete mode 100644 CMake/platforms/xbox_nxdk/finders/Findfmt.cmake diff --git a/3rdParty/libfmt/CMakeLists.txt b/3rdParty/libfmt/CMakeLists.txt index 5762e2edd71..4d69626041a 100644 --- a/3rdParty/libfmt/CMakeLists.txt +++ b/3rdParty/libfmt/CMakeLists.txt @@ -11,8 +11,16 @@ else() set(BUILD_SHARED_LIBS ON) endif() include(FetchContent) -FetchContent_Declare(libfmt - URL https://github.com/fmtlib/fmt/archive/22d31b31f0e9b4e4654ba67ee881f3564c2cc297.tar.gz - URL_HASH MD5=d4e8744846cb9e94a80aca932ed2d5c0 -) +if(NXDK) + # branch: nxdk-2022-07-19 + FetchContent_Declare(libfmt + URL https://github.com/diasurgical/fmt/archive/16d67608437f4fb9d293e561b4ddbccf3815a097.tar.gz + URL_HASH MD5=7ef45573ef301c250717c60458aa7536 + ) +else() + FetchContent_Declare(libfmt + URL https://github.com/fmtlib/fmt/archive/22d31b31f0e9b4e4654ba67ee881f3564c2cc297.tar.gz + URL_HASH MD5=d4e8744846cb9e94a80aca932ed2d5c0 + ) +endif() FetchContent_MakeAvailableExcludeFromAll(libfmt) diff --git a/CMake/platforms/xbox_nxdk.cmake b/CMake/platforms/xbox_nxdk.cmake index 7a1aff81f34..92f1b991a0a 100644 --- a/CMake/platforms/xbox_nxdk.cmake +++ b/CMake/platforms/xbox_nxdk.cmake @@ -5,6 +5,7 @@ set(UBSAN OFF) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/xbox_nxdk/finders") set(DEVILUTIONX_SYSTEM_BZIP2 OFF) +set(DEVILUTIONX_SYSTEM_LIBFMT OFF) set(BUILD_ASSETS_MPQ OFF) set(DEVILUTIONX_ASSETS_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pkg/assets") diff --git a/CMake/platforms/xbox_nxdk/finders/Findfmt.cmake b/CMake/platforms/xbox_nxdk/finders/Findfmt.cmake deleted file mode 100644 index b4733cadc33..00000000000 --- a/CMake/platforms/xbox_nxdk/finders/Findfmt.cmake +++ /dev/null @@ -1,5 +0,0 @@ -if(NOT TARGET fmt::fmt) - find_package(PkgConfig REQUIRED) - pkg_check_modules(fmt REQUIRED IMPORTED_TARGET fmt) - add_library(fmt::fmt ALIAS PkgConfig::fmt) -endif()