[llvm] fix zstd_shared detection on Windows (PR #139945)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 03:42:15 PDT 2025


================
@@ -29,11 +29,11 @@ find_package_handle_standard_args(
 )
 
 if(zstd_FOUND)
-  if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$")
+  if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$" AND NOT zstd_LIBRARY MATCHES "\\.dll\\.a$")
----------------
mstorsjo wrote:

Is there any cmake variable that contains the `.dll.a` suffix as a string? But perhaps we don't want to use that here; for MSVC that (`.lib`) would be equal to the static library suffix, so it would negate the effect of the first part of the condition.

https://github.com/llvm/llvm-project/pull/139945


More information about the llvm-commits mailing list