diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-02-02 11:47:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 11:47:31 -0800 |
commit | 82e02316072f38f994395b1620cda2aff927dd0f (patch) | |
tree | 9c377aacc457c837acdcd8a89db11a7b0639ee18 /cmake/CMakeLists.txt | |
parent | 5dad7cce19352505f0d93eefed9f170a4d9818fe (diff) | |
parent | 1ec9beb477a2c8c4e77b6e6c9046ea634019644d (diff) | |
download | protobuf-82e02316072f38f994395b1620cda2aff927dd0f.tar.gz protobuf-82e02316072f38f994395b1620cda2aff927dd0f.tar.bz2 protobuf-82e02316072f38f994395b1620cda2aff927dd0f.zip |
Merge pull request #4259 from Mizux/master
Various CMake Update
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r-- | cmake/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 2351392d..bf3f8863 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -8,6 +8,10 @@ endif() # CMake policies cmake_policy(SET CMP0022 NEW) +if(POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) +endif() + # Project project(protobuf C CXX) @@ -24,11 +28,7 @@ option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHAR include(CMakeDependentOption) cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON "NOT protobuf_BUILD_SHARED_LIBS" OFF) -if (MSVC) - set(protobuf_WITH_ZLIB_DEFAULT OFF) -else (MSVC) - set(protobuf_WITH_ZLIB_DEFAULT ON) -endif (MSVC) +set(protobuf_WITH_ZLIB_DEFAULT ON) option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT}) set(protobuf_DEBUG_POSTFIX "d" CACHE STRING "Default debug postfix") |