aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/zlib.cmake
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-02-07 15:57:23 +0100
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-02-07 16:20:22 +0100
commit6750d42ef1811cb5527f7eaa13fdbbd0cde4b8ef (patch)
tree7531d3c2bb4a1b113c1dad63ce985ccc76b34783 /cmake/zlib.cmake
parentfb369d95677b85995071e8255230c8bd7e291216 (diff)
fine tune cmake find_package usage
Diffstat (limited to 'cmake/zlib.cmake')
-rw-r--r--cmake/zlib.cmake6
1 files changed, 6 insertions, 0 deletions
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)