diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/libutils.cmake | 12 | ||||
-rw-r--r-- | cmake/os/Windows.cmake | 5 | ||||
-rw-r--r-- | cmake/plugin.cmake | 3 | ||||
-rw-r--r-- | cmake/wsrep.cmake | 2 | ||||
-rw-r--r-- | cmake/zlib.cmake | 18 |
5 files changed, 18 insertions, 22 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index 2e65e8b5ba3..2a218bc63b0 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -136,6 +136,10 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE) SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c) ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE}) SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) + IF(NOT _SKIP_PIC) + SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS + "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ENDIF() SET(OSLIBS) FOREACH(LIB ${LIBS_TO_MERGE}) @@ -240,11 +244,11 @@ MACRO(MERGE_LIBRARIES) # check for non-PIC libraries IF(NOT _SKIP_PIC) FOREACH(LIB ${LIBS}) - GET_TARGET_PROPERTY(${LIB} TYPE LIBTYPE) - IF(LIBTYPE STREQUAL "STATIC_LIBRARY") - GET_TARGET_PROPERTY(LIB COMPILE_FLAGS LIB_COMPILE_FLAGS) + GET_TARGET_PROPERTY(LTYPE ${LIB} TYPE) + IF(LTYPE STREQUAL "STATIC_LIBRARY") + GET_TARGET_PROPERTY(LIB_COMPILE_FLAGS ${LIB} COMPILE_FLAGS) STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}" - "<PIC_FLAG>" LIB_COMPILE_FLAGS ${LIB_COMPILE_FLAG}) + "<PIC_FLAG>" LIB_COMPILE_FLAGS "${LIB_COMPILE_FLAGS}") IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>") MESSAGE(FATAL_ERROR "Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n" diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index b69ae9bebf8..2058a21f559 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -128,9 +128,8 @@ IF(MSVC) ENDIF() # Always link with socket library -LINK_LIBRARIES(ws2_32) -# ..also for tests -SET(CMAKE_REQUIRED_LIBRARIES ws2_32) +STRING(APPEND CMAKE_C_STANDARD_LIBRARIES " ws2_32.lib") +STRING(APPEND CMAKE_CXX_STANDARD_LIBRARIES " ws2_32.lib") # System checks SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 702f8190e89..e11b11a3ce4 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -1,4 +1,5 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2018, Oracle and/or its affiliates. +# Copyright (c) 2011, 2018, MariaDB Corporation # # 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 diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 2ba32b469e0..0529f89b61c 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -18,7 +18,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "23") +SET(WSREP_PATCH_VERSION "24") # MariaDB addition: Revision number of the last revision merged from # codership branch visible in @@visible_comment. 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() |