UseZLIB.cmake 390 B

123456789101112
  1. function(eth_apply TARGET REQUIRED)
  2. find_package (ZLIB)
  3. eth_show_dependency(ZLIB Zlib)
  4. if (ZLIB_FOUND)
  5. target_include_directories(${TARGET} SYSTEM PUBLIC ${ZLIB_INCLUDE_DIRS})
  6. # target_link_libraries(${TARGET} ${ZLIB_LIBRARIES})
  7. target_link_libraries(${TARGET} z)
  8. elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
  9. message(FATAL_ERROR "Zlib library not found")
  10. endif()
  11. endfunction()