# Copyright (c) 2006, 2011, 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
# the Free Software Foundation; version 2 of the License.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
SET(HEADERS_GEN_CONFIGURE
mysql_version.h
my_config.h
mysqld_ername.h
mysqld_error.h
sql_state.h
)
SET(HEADERS
mysql.h
mysql_com.h
mysql_com_server.h
mariadb_capi_rename.h
pack.h
my_byteorder.h
little_endian.h
big_endian.h
mysql_time.h
ma_dyncol.h
my_list.h
my_alloc.h
my_alloca.h
typelib.h
my_dbug.h
m_string.h
my_sys.h
my_cmp.h
my_xml.h
mysql_embed.h
my_decimal_limits.h
my_pthread.h
decimal.h
errmsg.h
my_global.h
my_net.h
my_getopt.h
sslopt-longopts.h
my_dir.h
sslopt-vars.h
sslopt-case.h
my_valgrind.h
sql_common.h
keycache.h
m_ctype.h
my_attribute.h
my_compiler.h
handler_state.h
handler_ername.h
json_lib.h
)
# don't use C/C's (possibly outdated) copy of mysqld_error.h
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h
DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
INSTALL(FILES ${HEADERS}
DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development)
FOREACH(f ${HEADERS_GEN_CONFIGURE})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}
DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development)
ENDFOREACH(f)
IF(NOT WITH_WSREP)
SET(EXCL_SERVICE_WSREP "service_wsrep.h")
ENDIF()
INSTALL(DIRECTORY mysql/
DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development
FILES_MATCHING PATTERN "*.h"
PATTERN "${EXCL_SERVICE_WSREP}" EXCLUDE
)
STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}")
STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}")
MACRO(INSTALL_PRIVATE DIR)
INSTALL(DIRECTORY ${DIR}/.
DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development
FILES_MATCHING PATTERN "*.h"
PATTERN CMakeFiles EXCLUDE
PATTERN mysql EXCLUDE
REGEX "\\./(${EXCL_RE}$)" EXCLUDE)
ENDMACRO()
INSTALL_PRIVATE(${CMAKE_CURRENT_BINARY_DIR})
IF(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
INSTALL_PRIVATE(${CMAKE_CURRENT_SOURCE_DIR})
ENDIF()
MACRO(INSTALL_COMPAT_HEADER file footer)
INSTALL(CODE "FILE(WRITE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}/${file}
\"/* Do not edit this file directly, it was auto-generated by cmake */
#warning This file should not be included by clients, include only <mysql.h>
${footer}
\")" COMPONENT Development)
ENDMACRO()
INSTALL_COMPAT_HEADER(my_global.h "")
INSTALL_COMPAT_HEADER(my_alloca.h "")
INSTALL_COMPAT_HEADER(my_config.h "")
INSTALL_COMPAT_HEADER(my_alloca.h "")
INSTALL_COMPAT_HEADER(my_sys.h "")
INSTALL_COMPAT_HEADER(mysql_version.h "
#include <mariadb_version.h>
#define LIBMYSQL_VERSION MARIADB_CLIENT_VERSION_STR
")
INSTALL_COMPAT_HEADER(mysql_com.h "
#include <mariadb_com.h>
")
# A utility target to generate the plugin API documentation in markdown format.
SET(WITH_GENERATED_DOCS OFF CACHE BOOL "Produce the generated docs")
IF (WITH_GENERATED_DOCS)
FIND_PROGRAM(BASH bash)
IF(NOT BASH)
MESSAGE(FATAL_ERROR "bash not found, cannot generate plugin API documentation")
ENDIF()
FILE(GLOB_RECURSE PLUGIN_API_DOCS CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/mysql/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/mysql/*.dox")
SET(DOCS_STAMP "${CMAKE_BINARY_DIR}/docs/plugin_api/md/api.md")
ADD_CUSTOM_COMMAND(
OUTPUT ${DOCS_STAMP}
COMMAND ${BASH} generate_plugin_api_docs.sh "${CMAKE_BINARY_DIR}/docs/plugin_api"
MAIN_DEPENDENCY mysql/Doxyfile.generated_docs_plugin_api
DEPENDS ${PLUGIN_API_DOCS} mysql/generate_plugin_api_docs.sh
BYPRODUCTS "${CMAKE_BINARY_DIR}/docs/plugin_api/xml"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/mysql"
COMMENT "Generating plugin API documentation")
ADD_CUSTOM_TARGET(plugin_api_docs ALL
DEPENDS ${DOCS_STAMP})
ENDIF()
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-10-08)
¤
*© Formatika GbR, Deutschland