From 91527014c2f8cbc63e1588beb84d27b7780dbd85 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 5 May 2012 08:27:17 +0200 Subject: [PATCH] MDEV-207 Install headers required to build external storage plugins 5.5 version. for cmake, not autotools. --- .bzrignore | 1 + debian/libmariadbclient-dev.files | 3 +-- include/CMakeLists.txt | 23 +++++++++++++++++------ regex/CMakeLists.txt | 2 ++ sql/CMakeLists.txt | 6 ++++++ 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/.bzrignore b/.bzrignore index f757e602563..f2b28d74d64 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1140,3 +1140,4 @@ libmysqld/gcalc_tools.cc sql/share/errmsg.sys sql/share/mysql install_manifest.txt +sql/db.opt diff --git a/debian/libmariadbclient-dev.files b/debian/libmariadbclient-dev.files index f75f049ec00..8f56a3065d5 100644 --- a/debian/libmariadbclient-dev.files +++ b/debian/libmariadbclient-dev.files @@ -1,6 +1,5 @@ usr/bin/mysql_config -usr/include/mysql/*.h -usr/include/mysql/psi/*.h +usr/include/mysql usr/lib/libmysqlclient.a usr/lib/libmysqlclient_r.a usr/lib/libmysqlservices.a diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 3046c3f7614..6404074c8c9 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -14,11 +14,11 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA SET(HEADERS_GEN_CONFIGURE -${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h -${CMAKE_CURRENT_BINARY_DIR}/my_config.h -${CMAKE_CURRENT_BINARY_DIR}/mysqld_ername.h -${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h -${CMAKE_CURRENT_BINARY_DIR}/sql_state.h + mysql_version.h + my_config.h + mysqld_ername.h + mysqld_error.h + sql_state.h ) SET(HEADERS @@ -49,8 +49,19 @@ SET(HEADERS m_ctype.h my_attribute.h my_compiler.h - ${HEADERS_GEN_CONFIGURE} ) INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) +FOREACH(f ${HEADERS_GEN_CONFIGURE}) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) +ENDFOREACH(f) INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h") + +STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}") +STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}") + +INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development + FILES_MATCHING PATTERN "*.h" + PATTERN CMakeFiles EXCLUDE + PATTERN mysql EXCLUDE + REGEX "\\./(${EXCL_RE}$)" EXCLUDE) diff --git a/regex/CMakeLists.txt b/regex/CMakeLists.txt index 83c13015671..b4a72620ac5 100644 --- a/regex/CMakeLists.txt +++ b/regex/CMakeLists.txt @@ -17,3 +17,5 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c) ADD_CONVENIENCE_LIBRARY(regex ${REGEX_SOURCES}) + +INSTALL(FILES "my_regex.h" DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 0e64487e24f..f57addbc117 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -353,3 +353,9 @@ IF(WIN32) COMPONENT Server) TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) ENDIF(WIN32) + +INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/private COMPONENT Development + FILES_MATCHING PATTERN "*.h" + PATTERN examples EXCLUDE + PATTERN share EXCLUDE + PATTERN CMakeFiles EXCLUDE)