From 3eba2cf60d5af37102911279af9d526895590711 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 14 Apr 2024 00:24:38 -0700 Subject: [PATCH 1/2] CMakeLists.txt: use libfmt from thirdparty/fmt Now compiles on Ubuntu 22.04, which only has libfmt 8. I don't know which exact version of libfmt we need but the one in thirdparty works. This version of libfmt is header-only. --- CMakeLists.txt | 3 ++- src/CMakeLists.txt | 2 +- thirdparty/CMakeLists.txt | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99f4f87b5..951ee9708 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,8 @@ find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(SDL2 CONFIG REQUIRED) find_package(CURL REQUIRED) -find_package(FMT CONFIG REQUIRED) +# Use the one in thirdparty/fmt to guarantee a minimum version +#find_package(FMT CONFIG REQUIRED) # libgme defaults to "Nuked" YM2612 emulator, which is # very SLOW. The system library probably uses the diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f9f351c0e..52d2285b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -268,7 +268,7 @@ target_link_libraries(SRB2SDL2 PRIVATE glm::glm) target_link_libraries(SRB2SDL2 PRIVATE Stb) target_link_libraries(SRB2SDL2 PRIVATE xmp-lite::xmp-lite) target_link_libraries(SRB2SDL2 PRIVATE glad::glad) -target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt) +target_link_libraries(SRB2SDL2 PRIVATE fmt::fmt-header-only) target_link_libraries(SRB2SDL2 PRIVATE imgui::imgui) target_link_libraries(SRB2SDL2 PRIVATE Tracy::TracyClient) if(SRB2_CONFIG_ENABLE_WEBM_MOVIES) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 3a99bc11b..987d20650 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -11,3 +11,5 @@ add_subdirectory(glad) add_subdirectory(tracy) add_subdirectory(libwebm) + +add_subdirectory(fmt) From e9744823f6baf6284577b20a49c47b308a2c6552 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sun, 14 Apr 2024 11:15:30 -0500 Subject: [PATCH 2/2] Remove fmt from vcpkg.json --- vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 854d2beb1..505ca3d6d 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -4,7 +4,6 @@ "version": "1.0.0", "dependencies": [ "curl", - "fmt", "sdl2", "libpng", "libogg",