aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/CMakeLists.txt.template
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-28 12:21:46 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-09-11 11:04:52 +0200
commitae6fd66cef94bf9d4d89bcdcf64a7463ef0e77f2 (patch)
tree02236e765e87913dc16af9ed1bf15b79c7ea10a0 /templates/CMakeLists.txt.template
parentb2cf73e1f81a9c9eeff6dab8f8980c1711784796 (diff)
fix zlib and openssl package mode
Diffstat (limited to 'templates/CMakeLists.txt.template')
-rw-r--r--templates/CMakeLists.txt.template18
1 files changed, 7 insertions, 11 deletions
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index ad79873d56..f2ce9b5a90 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -168,10 +168,8 @@
set(gRPC_INSTALL FALSE)
endif()
elseif("<%text>${gRPC_ZLIB_PROVIDER}</%text>" STREQUAL "package")
- find_package(ZLIB)
- if(TARGET ZLIB::ZLIB)
- set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
- endif()
+ find_package(ZLIB REQUIRED)
+ set(_gRPC_ZLIB_LIBRARIES <%text>${ZLIB_LIBRARIES}</%text>)
set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif()
@@ -190,7 +188,7 @@
set(gRPC_INSTALL FALSE)
endif()
elseif("<%text>${gRPC_CARES_PROVIDER}</%text>" STREQUAL "package")
- find_package(c-ares CONFIG)
+ find_package(c-ares REQUIRED CONFIG)
if(TARGET c-ares::cares)
set(_gRPC_CARES_LIBRARIES c-ares::cares)
endif()
@@ -234,7 +232,7 @@
set(gRPC_INSTALL FALSE)
endif()
elseif("<%text>${gRPC_PROTOBUF_PROVIDER}</%text>" STREQUAL "package")
- find_package(Protobuf <%text>${gRPC_PROTOBUF_PACKAGE_TYPE}</%text>)
+ find_package(Protobuf REQUIRED <%text>${gRPC_PROTOBUF_PACKAGE_TYPE}</%text>)
if(Protobuf_FOUND OR PROTOBUF_FOUND)
if(TARGET protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
set(_gRPC_PROTOBUF_LIBRARIES protobuf::<%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>)
@@ -279,11 +277,9 @@
set(gRPC_INSTALL FALSE)
endif()
elseif("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "package")
- find_package(OpenSSL)
- if(TARGET OpenSSL::SSL)
- set(_gRPC_SSL_LIBRARIES OpenSSL::SSL)
- endif()
- set(_gRPC_FIND_SSL "if(NOT OpenSSL_FOUND)\n find_package(OpenSSL)\nendif()")
+ find_package(OpenSSL REQUIRED)
+ set(_gRPC_SSL_LIBRARIES <%text>${OPENSSL_LIBRARIES}</%text>)
+ set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()
if("<%text>${gRPC_GFLAGS_PROVIDER}</%text>" STREQUAL "module")