[cmake] fix zstd link
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
9fc0a65619
commit
4d3202b8bd
2 changed files with 25 additions and 8 deletions
|
@ -437,10 +437,32 @@ if (YUZU_USE_CPM)
|
|||
endif()
|
||||
|
||||
# zstd
|
||||
AddJsonPackage(zstd)
|
||||
AddPackage(
|
||||
NAME zstd
|
||||
REPO facebook/zstd
|
||||
SHA f8745da6ff
|
||||
HASH 3037007f990040fe32573b46f9bef8762fd5dbeeb07ffffcbfeba51ec98167edae39bb9c87f9299efcd61c4e467c5e84f7c19f0df7799bc1fc04864a278792ee
|
||||
VERSION 1.5
|
||||
SOURCE_SUBDIR build/cmake
|
||||
FIND_PACKAGE_ARGUMENTS "MODULE"
|
||||
OPTIONS
|
||||
"ZSTD_BUILD_SHARED OFF"
|
||||
"ZSTD_BUILD_STATIC ON"
|
||||
EXCLUDE_FROM_ALL ON
|
||||
)
|
||||
|
||||
if (zstd_ADDED)
|
||||
add_library(zstd::zstd ALIAS libzstd_static)
|
||||
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
|
||||
|
|
|
@ -274,11 +274,6 @@ endif()
|
|||
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
|
||||
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd)
|
||||
|
||||
if (TARGET unordered_dense::unordered_dense)
|
||||
# weird quirk of system installs
|
||||
target_link_libraries(common PUBLIC unordered_dense::unordered_dense)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# For ASharedMemory_create
|
||||
target_link_libraries(common PRIVATE android)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue