mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 07:27:50 +08:00
fb3190dcc5
* Require cmake-user to pass CI * Update baseline state documentation * Test pkg-config integration * Prefer pkgconf * Make pkgconf required
12 lines
412 B
CMake
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()
|