diff --git a/pulsar-client-cpp/CMakeLists.txt b/pulsar-client-cpp/CMakeLists.txt index 7101bbe1cf27ebf9214311fedf21ee980a2faa5a..5c6613c44a398e7c478b160559122995dc66501d 100644 --- a/pulsar-client-cpp/CMakeLists.txt +++ b/pulsar-client-cpp/CMakeLists.txt @@ -70,6 +70,7 @@ if (LINK_STATIC) else() # Link to shared libraries find_package(ZLIB REQUIRED) + set(ZLIB_LIBRARY_PATH ${ZLIB_LIBRARIES}) if (NOT PROTOBUF_LIBRARIES) find_package(ProtoBuf QUIET) if (NOT ProtoBuf_FOUND)