|
|
|
@ -13,11 +13,11 @@ option(protobuf_BUILD_TESTS "Build tests" ON) |
|
|
|
|
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF) |
|
|
|
|
option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) |
|
|
|
|
if (MSVC) |
|
|
|
|
set(ZLIB_DEFAULT OFF) |
|
|
|
|
set(protobuf_WITH_ZLIB_DEFAULT OFF) |
|
|
|
|
else (MSVC) |
|
|
|
|
set(ZLIB_DEFAULT ON) |
|
|
|
|
set(protobuf_WITH_ZLIB_DEFAULT ON) |
|
|
|
|
endif (MSVC) |
|
|
|
|
option(ZLIB "Build with zlib support" ${ZLIB_DEFAULT}) |
|
|
|
|
option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT}) |
|
|
|
|
|
|
|
|
|
# Path to main configure script |
|
|
|
|
set(protobuf_CONFIGURE_SCRIPT "../configure.ac") |
|
|
|
@ -63,7 +63,7 @@ if (CMAKE_USE_PTHREADS_INIT) |
|
|
|
|
add_definitions(-DHAVE_PTHREAD) |
|
|
|
|
endif (CMAKE_USE_PTHREADS_INIT) |
|
|
|
|
|
|
|
|
|
if (ZLIB) |
|
|
|
|
if (protobuf_WITH_ZLIB) |
|
|
|
|
find_package(ZLIB) |
|
|
|
|
if (ZLIB_FOUND) |
|
|
|
|
set(HAVE_ZLIB 1) |
|
|
|
@ -81,7 +81,7 @@ if (ZLIB) |
|
|
|
|
set(ZLIB_INCLUDE_DIRECTORIES) |
|
|
|
|
set(ZLIB_LIBRARIES) |
|
|
|
|
endif (ZLIB_FOUND) |
|
|
|
|
endif (ZLIB) |
|
|
|
|
endif (protobuf_WITH_ZLIB) |
|
|
|
|
|
|
|
|
|
if (HAVE_ZLIB) |
|
|
|
|
add_definitions(-DHAVE_ZLIB) |
|
|
|
|