[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$")
set(zstd_STATIC_LIBRARY "${zstd_LIBRARY}")
elseif (NOT TARGET zstd::libzstd_shared)
add_library(zstd::libzstd_shared SHARED IMPORTED)
- if(MSVC OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+ if(WIN32 OR CYGWIN)
include(GNUInstallDirs) # For CMAKE_INSTALL_LIBDIR and friends.
----------------
mstorsjo wrote:
Can you briefly explain what the code within this conditional branch does? (It's quite unreadable cmake soup as is...) I presume it does some transformation which is essential for using zstd in a mingw build setting.
Is it essential only for using the output of llvm-config, or for building llvm itself as well?
https://github.com/llvm/llvm-project/pull/139945
More information about the llvm-commits
mailing list