zeek/auxil/vcpkg/scripts/test_ports/cmake-user/project/FindZLIBviaPkgConfig.cmake
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

12 lines
412 B
CMake

# `pkgconf` is not recognized before CMake 3.22
find_program(PKG_CONFIG_EXECUTABLE NAMES pkgconf REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(PC_ZLIB zlib)
if(PC_ZLIB_FOUND)
if(NOT PC_ZLIB_LDFLAGS)
message(SEND_ERROR "ZLIBviaPkgConfig_LIBRARIES is empty")
endif()
set(ZLIBviaPkgConfig_LIBRARIES "${PC_ZLIB_LDFLAGS}")
set(ZLIBviaPkgConfig_FOUND "${PC_ZLIB_FOUND}")
endif()