use LLVM_USE_STATIC_ZSTD
removes LLVM_PREFER_STATIC_ZSTD in favor of using a LLVM_USE_STATIC_ZSTD Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D133222
This commit is contained in:
parent
acf141677e
commit
fc1da043f4
|
@ -486,7 +486,7 @@ set(LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression i
|
|||
|
||||
set(LLVM_ENABLE_ZSTD "ON" CACHE STRING "Use zstd for compression/decompression if available. Can be ON, OFF, or FORCE_ON")
|
||||
|
||||
set(LLVM_PREFER_STATIC_ZSTD TRUE CACHE BOOL "Use static version of zstd if available. Can be TRUE, FALSE")
|
||||
set(LLVM_USE_STATIC_ZSTD FALSE CACHE BOOL "Use static version of zstd. Can be TRUE, FALSE")
|
||||
|
||||
set(LLVM_ENABLE_CURL "OFF" CACHE STRING "Use libcurl for the HTTP client if available. Can be ON, OFF, or FORCE_ON")
|
||||
|
||||
|
|
|
@ -25,21 +25,11 @@ if(LLVM_ENABLE_ZLIB)
|
|||
list(APPEND imported_libs ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
set(zstd_target none)
|
||||
|
||||
if(LLVM_ENABLE_ZSTD)
|
||||
if(LLVM_PREFER_STATIC_ZSTD)
|
||||
if(TARGET zstd::libzstd_static)
|
||||
set(zstd_target zstd::libzstd_static)
|
||||
else()
|
||||
set(zstd_target zstd::libzstd_shared)
|
||||
endif()
|
||||
if(TARGET zstd::libzstd_shared AND NOT LLVM_USE_STATIC_ZSTD)
|
||||
set(zstd_target zstd::libzstd_shared)
|
||||
else()
|
||||
if(TARGET zstd::libzstd_shared)
|
||||
set(zstd_target zstd::libzstd_shared)
|
||||
else()
|
||||
set(zstd_target zstd::libzstd_static)
|
||||
endif()
|
||||
set(zstd_target zstd::libzstd_static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue