workaround zlib cmake issue

pull/11582/head
Jan Tattermusch 8 years ago
parent b9fc05bf93
commit 74c74fb04e
  1. 3
      CMakeLists.txt
  2. 3
      templates/CMakeLists.txt.template

@ -98,6 +98,9 @@ if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
endif()
set(ZLIB_INCLUDE_DIR "${ZLIB_ROOT_DIR}")
if(EXISTS "${ZLIB_ROOT_DIR}/CMakeLists.txt")
# TODO(jtattermusch): workaround for https://github.com/madler/zlib/issues/218
include_directories(${ZLIB_INCLUDE_DIR})
add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)
if(TARGET zlibstatic)
set(_gRPC_ZLIB_LIBRARIES zlibstatic)

@ -143,6 +143,9 @@
endif()
set(ZLIB_INCLUDE_DIR "<%text>${ZLIB_ROOT_DIR}</%text>")
if(EXISTS "<%text>${ZLIB_ROOT_DIR}</%text>/CMakeLists.txt")
# TODO(jtattermusch): workaround for https://github.com/madler/zlib/issues/218
include_directories(<%text>${ZLIB_INCLUDE_DIR}</%text>)
add_subdirectory(<%text>${ZLIB_ROOT_DIR}</%text> third_party/zlib)
if(TARGET zlibstatic)
set(_gRPC_ZLIB_LIBRARIES zlibstatic)

Loading…
Cancel
Save