summaryrefslogtreecommitdiff
path: root/cmake/zlib.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-10-27 20:46:18 +0200
committerSergei Golubchik <serg@mariadb.org>2018-10-27 20:46:38 +0200
commit37ab7e45963627f3c1ea2dd43d5b305de37bb16f (patch)
treee07ada7fbde72c438f2a6a6c162e050caf1950f9 /cmake/zlib.cmake
parent30c3d6db328d73f1b30be537aceb55d37936fdb9 (diff)
parent893ebb739e24637985892da1555f2e6f1a8ac5b6 (diff)
downloadmariadb-git-37ab7e45963627f3c1ea2dd43d5b305de37bb16f.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'cmake/zlib.cmake')
-rw-r--r--cmake/zlib.cmake18
1 files changed, 5 insertions, 13 deletions
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
index 03d2c542ba4..4b7faacc466 100644
--- a/cmake/zlib.cmake
+++ b/cmake/zlib.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,15 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MACRO (MYSQL_USE_BUNDLED_ZLIB)
- SET(ZLIB_LIBRARY zlib)
- SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib)
+ SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
+ SET(BUILD_BUNDLED_ZLIB 1)
+ SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library")
SET(ZLIB_FOUND TRUE)
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
ADD_SUBDIRECTORY(zlib)
- GET_TARGET_PROPERTY(src zlib SOURCES)
- FOREACH(file ${src})
- SET(ZLIB_SOURCES ${ZLIB_SOURCES} ${CMAKE_SOURCE_DIR}/zlib/${file})
- ENDFOREACH()
ENDMACRO()
# MYSQL_CHECK_ZLIB_WITH_COMPRESS
@@ -37,15 +34,10 @@ ENDMACRO()
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
- IF(CMAKE_SYSTEM_NAME STREQUAL "OS400" OR
- CMAKE_SYSTEM_NAME STREQUAL "AIX" OR
- CMAKE_SYSTEM_NAME STREQUAL "Windows")
- # Use bundled zlib on some platforms by default (system one is too
- # old or not existent)
+ # For NDBCLUSTER: Use bundled zlib by default
IF (NOT WITH_ZLIB)
SET(WITH_ZLIB "bundled" CACHE STRING "By default use bundled zlib on this platform")
ENDIF()
- ENDIF()
IF(WITH_ZLIB STREQUAL "bundled")
MYSQL_USE_BUNDLED_ZLIB()