forcibly disable COMPRESS package is zlib is not found

This commit is contained in:
Axel Kohlmeyer
2023-01-24 12:51:52 -05:00
parent 1e78254000
commit c744be7060

View File

@ -1,4 +1,9 @@
find_package(ZLIB REQUIRED)
find_package(ZLIB)
if(NOT ZLIB_FOUND)
message(WARNING "No Zlib development support found. Disabling COMPRESS package...")
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
return()
endif()
target_link_libraries(lammps PRIVATE ZLIB::ZLIB)
find_package(PkgConfig QUIET)