[cmake] fix zstd link
All checks were successful
eden-license / license-header (pull_request) Successful in 26s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-08-25 11:30:47 -04:00
parent ec3928915e
commit dd636464d4
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
2 changed files with 17 additions and 7 deletions

View file

@ -486,11 +486,27 @@ if (YUZU_USE_CPM)
HASH 3037007f990040fe32573b46f9bef8762fd5dbeeb07ffffcbfeba51ec98167edae39bb9c87f9299efcd61c4e467c5e84f7c19f0df7799bc1fc04864a278792ee HASH 3037007f990040fe32573b46f9bef8762fd5dbeeb07ffffcbfeba51ec98167edae39bb9c87f9299efcd61c4e467c5e84f7c19f0df7799bc1fc04864a278792ee
VERSION 1.5 VERSION 1.5
SOURCE_SUBDIR build/cmake SOURCE_SUBDIR build/cmake
FIND_PACKAGE_ARGUMENTS "MODULE"
OPTIONS OPTIONS
"ZSTD_BUILD_SHARED OFF" "ZSTD_BUILD_SHARED OFF"
"ZSTD_BUILD_STATIC ON"
EXCLUDE_FROM_ALL ON EXCLUDE_FROM_ALL ON
) )
if (zstd_ADDED AND NOT TARGET zstd::zstd)
if (TARGET zstd::libzstd_shared)
add_library(zstd::zstd ALIAS zstd::libzstd_shared)
elseif (TARGET zstd::libzstd_static)
add_library(zstd::zstd ALIAS zstd::libzstd_static)
elseif (TARGET libzstd_shared)
add_library(zstd::zstd ALIAS libzstd_shared)
elseif (TARGET libzstd_static)
add_library(zstd::zstd ALIAS libzstd_static)
else()
message(FATAL_ERROR "Could not determine zstd target")
endif()
endif()
# Catch2 # Catch2
if (YUZU_TESTS OR DYNARMIC_TESTS) if (YUZU_TESTS OR DYNARMIC_TESTS)
AddPackage( AddPackage(

View file

@ -272,13 +272,7 @@ if (lz4_ADDED)
endif() endif()
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads) target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle) target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd)
if (TARGET libzstd_static)
target_link_libraries(common PRIVATE libzstd_static)
else()
target_link_libraries(common PRIVATE zstd)
endif()
if(ANDROID) if(ANDROID)
# For ASharedMemory_create # For ASharedMemory_create