From 6750d42ef1811cb5527f7eaa13fdbbd0cde4b8ef Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Feb 2018 15:57:23 +0100 Subject: fine tune cmake find_package usage --- cmake/zlib.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmake/zlib.cmake') diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index e4c94f5213..ed7c9c216a 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -33,6 +33,12 @@ if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module") set(gRPC_INSTALL FALSE) endif() elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package") + # zlib installation directory can be configured by setting ZLIB_ROOT + # We allow locating zlib using both "CONFIG" and "MODULE" as the expectation + # is that many Linux systems will have zlib installed via a distribution + # package ("MODULE"), while on Windows the user is likely to have installed + # zlib using cmake ("CONFIG"). + # See https://cmake.org/cmake/help/v3.6/module/FindZLIB.html find_package(ZLIB REQUIRED) if(TARGET ZLIB::ZLIB) -- cgit v1.2.3