diff --git a/CMakeLists.txt b/CMakeLists.txt index 864d509..e13345d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,11 @@ endif() # zstd if (WITH_SYSTEM_ZSTD) find_package(zstd REQUIRED) - list(APPEND PLATFORM_LIBS zstd::libzstd_shared) + if(TARGET zstd::libzstd_shared) + list(APPEND PLATFORM_LIBS zstd::libzstd_shared) + else() + list(APPEND PLATFORM_LIBS zstd::libzstd_static) + endif() else() if(NOT TARGET libzstd_static) option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF)