 diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 849679995..d80ffcdc7 100644
+index 849679995..1efc6141c 100644
 --- a/cmake/CMakeLists.txt
 +++ b/cmake/CMakeLists.txt
-@@ -48,7 +48,7 @@ else (BUILD_SHARED_LIBS)
+@@ -15,6 +15,10 @@ endif ()
+ if(POLICY CMP0048)
+   cmake_policy(SET CMP0048 NEW)
+ endif()
++# option() honors normal variables.
++if(POLICY CMP0077)
++	cmake_policy(SET CMP0077 NEW)
++endif()
+ 
+ # Project
+ project(protobuf C CXX)
+@@ -48,7 +52,7 @@ else (BUILD_SHARED_LIBS)
  endif (BUILD_SHARED_LIBS)
  option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT})
  include(CMakeDependentOption)

     set(HAVE_ZLIB 1)
     # FindZLIB module define ZLIB_INCLUDE_DIRS variable
     # Set ZLIB_INCLUDE_DIRECTORIES for compatible
@@ -125,15 +127,15 @@ if (protobuf_WITH_ZLIB)
     # Using imported target if exists
     if (TARGET ZLIB::ZLIB)
       set(ZLIB_LIBRARIES ZLIB::ZLIB)

   "NOT protobuf_BUILD_SHARED_LIBS" OFF)
 set(protobuf_WITH_ZLIB_DEFAULT ON)
 option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT})
@@ -116,8 +120,10 @@ endif (CMAKE_USE_PTHREADS_INIT)
 
 set(_protobuf_FIND_ZLIB)
 if (protobuf_WITH_ZLIB)
