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 ade0718c11
commit 697e5b15ec

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)