I looked at this further today. Whilst there is a workaround by setting ENABLE_ZSTD=OFF the following code still has the chance of erroring. There is an alternative fix in that line 251 could be updated to cause a hard failure, not passthru.
|
if(ENABLE_ZSTD) |
|
find_package(zstd 1.3.6) |
|
if(zstd_FOUND) |
|
set(HAVE_LIBZSTD 1) |
|
if(TARGET zstd::libzstd_shared) |
|
set(zstd_TARGET zstd::libzstd_shared) |
|
else() |
|
set(zstd_TARGET zstd::libzstd_static) |
|
endif() |
|
else() |
|
message(WARNING "-- zstd library not found; zstandard support disabled") |
|
endif(zstd_FOUND) |
|
endif(ENABLE_ZSTD) |
Line 353 should really be conditioned by zstd_FOUND or zstd_TARGET, as if zstd is not found then the incorrect .pc file is still generated.
|
if(ENABLE_ZSTD) |
|
string(REGEX REPLACE "-l${zstd_TARGET}" "-lzstd" LIBS ${LIBS}) |
|
endif() |
I looked at this further today. Whilst there is a workaround by setting ENABLE_ZSTD=OFF the following code still has the chance of erroring. There is an alternative fix in that line 251 could be updated to cause a hard failure, not passthru.
libzip/CMakeLists.txt
Lines 241 to 253 in 210b09d
Line 353 should really be conditioned by zstd_FOUND or zstd_TARGET, as if zstd is not found then the incorrect .pc file is still generated.
libzip/CMakeLists.txt
Lines 352 to 354 in 210b09d