From 3158ad3efc91444b33ccdf8d01a94c4636d735b4 Mon Sep 17 00:00:00 2001 From: crueter Date: Tue, 13 Jan 2026 20:57:58 -0500 Subject: [PATCH] fix libzstd link httplib was linking to zstd::libzstd, which unconditionally links to the shared version of zstd. Not even a setting or anything. :/ so let's just override INTERFACE_LINK_LIBRARIES Signed-off-by: crueter --- CMakeModules/Findzstd.cmake | 6 ++++-- src/common/CMakeLists.txt | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeModules/Findzstd.cmake b/CMakeModules/Findzstd.cmake index 2afdb56a8c..8e44b7a892 100644 --- a/CMakeModules/Findzstd.cmake +++ b/CMakeModules/Findzstd.cmake @@ -14,8 +14,7 @@ else() pkg_search_module(ZSTD QUIET IMPORTED_TARGET libzstd) find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LINK_LIBRARIES - VERSION_VAR ZSTD_VERSION - ) + VERSION_VAR ZSTD_VERSION) endif() if (zstd_FOUND AND NOT TARGET zstd::zstd) @@ -36,4 +35,7 @@ if (NOT TARGET zstd::libzstd) else() add_library(zstd::libzstd ALIAS zstd::zstd) endif() +elseif(YUZU_STATIC_BUILD AND TARGET zstd::libzstd_static) + # zstd::libzstd links to shared zstd by default + set_target_properties(zstd::libzstd PROPERTIES INTERFACE_LINK_LIBRARIES zstd::libzstd_static) endif() diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index a3d57ffce4..77a1f7852b 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -220,8 +220,7 @@ else() stb.cpp PROPERTIES COMPILE_OPTIONS - "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers" - ) + "-Wno-implicit-fallthrough;-Wno-missing-declarations;-Wno-missing-field-initializers") # Get around GCC failing with intrinsics in Debug if(CXX_GCC AND CMAKE_BUILD_TYPE MATCHES "Debug") @@ -240,8 +239,7 @@ if(CXX_CLANG) PRIVATE # Clang 14 and earlier have errors when explicitly instantiating # Settings::Setting - $<$,15>:CANNOT_EXPLICITLY_INSTANTIATE> - ) + $<$,15>:CANNOT_EXPLICITLY_INSTANTIATE>) endif() if (BOOST_NO_HEADERS)