diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-08-03 11:03:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-03 11:03:15 -0700 |
commit | 0dca3cc5d642590d4c2bc75ce15e0c2ca31bcc87 (patch) | |
tree | 1db74a4f563c4bea6378bc10d136167393883044 /cmake/CMakeLists.txt | |
parent | dedd8aec0d87e3d6df511a881ca15f51b3c8f487 (diff) | |
parent | eefd1fdd488eba88834a41d1008e0a8f1ae2a41c (diff) | |
download | protobuf-0dca3cc5d642590d4c2bc75ce15e0c2ca31bcc87.tar.gz protobuf-0dca3cc5d642590d4c2bc75ce15e0c2ca31bcc87.tar.bz2 protobuf-0dca3cc5d642590d4c2bc75ce15e0c2ca31bcc87.zip |
Merge pull request #1865 from podsvirov/topic-cmake-project
CMake: Improvements and Bugfixes
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r-- | cmake/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 07b176d9..f947b741 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -86,6 +86,7 @@ if (CMAKE_USE_PTHREADS_INIT) add_definitions(-DHAVE_PTHREAD) endif (CMAKE_USE_PTHREADS_INIT) +set(_protobuf_FIND_ZLIB) if (protobuf_WITH_ZLIB) find_package(ZLIB) if (ZLIB_FOUND) @@ -96,6 +97,7 @@ if (protobuf_WITH_ZLIB) # Using imported target if exists if (TARGET ZLIB::ZLIB) set(ZLIB_LIBRARIES ZLIB::ZLIB) + set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()") endif (TARGET ZLIB::ZLIB) else (ZLIB_FOUND) set(HAVE_ZLIB 0) |