1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Manual merge from 2.3 branch:

put cmake helper scripts under new BSD license
This commit is contained in:
Georg Richter
2016-07-09 10:53:09 +02:00
parent e328467494
commit f0601e0e40
17 changed files with 142 additions and 20 deletions

View File

@@ -0,0 +1,22 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,7 +1,15 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for various functions. # checks for various functions.
# include/my_config.h.in
# You will find the appropiate defines in # You will find the appropiate defines in
# include/my_config.h.in
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for various header files. # checks for various header files.
# You will find the appropiate defines in # You will find the appropiate defines in

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# This file is included by CMakeLists.txt and # This file is included by CMakeLists.txt and
# checks for type sizes. # checks for type sizes.
# You will find the appropiate defines in # You will find the appropiate defines in

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(GET_CONNECTOR_PACKAGE_NAME name) MACRO(GET_CONNECTOR_PACKAGE_NAME name)
# check if we have 64bit # check if we have 64bit
IF(SIZEOF_VOIDP EQUAL 8) IF(SIZEOF_VOIDP EQUAL 8)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# - Try to detect the GSSAPI support # - Try to detect the GSSAPI support
# Once done this will define # Once done this will define
# #

View File

@@ -1,4 +1,17 @@
# Copyright (c) 2010 Michael Bell <michael.bell@web.de> #
# Copyright (C) 2010 Michael Bell <michael.bell@web.de>
# 2015-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# ICONV_EXTERNAL - Iconv is an external library (not libc)
# ICONV_FOUND - system has Iconv
# ICONV_INCLUDE_DIR - the Iconv include directory
# ICONV_LIBRARIES - Link these to use Iconv
# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
# ICONV_VERSION - Iconv version string
if (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) if (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
# Already in cache, be silent # Already in cache, be silent

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists) INCLUDE(CheckLibraryExists)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
IF(MSVC) IF(MSVC)
SET(BFD_H_EXISTS 0 CACHE INTERNAL "") SET(BFD_H_EXISTS 0 CACHE INTERNAL "")
SET(HAVE_ACCESS 1 CACHE INTERNAL "") SET(HAVE_ACCESS 1 CACHE INTERNAL "")

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(CREATE_EXPORT_FILE targetname directory symbols) MACRO(CREATE_EXPORT_FILE targetname directory symbols)
SET(EXPORT_FILE "${directory}/${targetname}.def") SET(EXPORT_FILE "${directory}/${targetname}.def")
IF(WIN32) IF(WIN32)

View File

@@ -1,22 +1,10 @@
# ************************************************************************************
# Copyright (C) 2014 MariaDB Corporation Ab
#
# This library is free software#; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not see <http://www.gnu.org/licenses>
# or write to the Free Software Foundation, Inc.,
# 51 Franklin St., Fifth Floor, Boston, MA 02110, USA
# #
# ************************************************************************************* # Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# #
# This file contains settings for the following layouts: # This file contains settings for the following layouts:

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# plugin installation # plugin installation
MACRO(INSTALL_PLUGIN name binary_dir) MACRO(INSTALL_PLUGIN name binary_dir)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# toolchain file for building a 32bit version on a 64bit host # toolchain file for building a 32bit version on a 64bit host
# Usage: # Usage:

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
# plugin configuration # plugin configuration
MACRO(REGISTER_PLUGIN name source struct type target allow) MACRO(REGISTER_PLUGIN name source struct type target allow)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(SIGN_TARGET target) MACRO(SIGN_TARGET target)
IF(WITH_SIGNCODE) IF(WITH_SIGNCODE)
IF(WIN32) IF(WIN32)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
MACRO(create_symlink symlink_name target install_path) MACRO(create_symlink symlink_name target install_path)
# According to cmake documentation symlinks work on unix systems only # According to cmake documentation symlinks work on unix systems only
IF(UNIX) IF(UNIX)

View File

@@ -1,3 +1,10 @@
#
# Copyright (C) 2013-2016 MariaDB Corporation AB
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the COPYING-CMAKE-SCRIPTS file.
#
FUNCTION(GET_FILE_VERSION FILE_NAME FILE_VERSION) FUNCTION(GET_FILE_VERSION FILE_NAME FILE_VERSION)
# if we build from a git repository, we calculate the file version: # if we build from a git repository, we calculate the file version: