summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-09-11 14:29:15 +0200
committerSergei Golubchik <serg@mariadb.org>2017-09-18 10:12:23 +0200
commit3878baddf13efcee656ce2ad970a8326c7305fba (patch)
tree2a56d9f0eea135f404cc58aaf3c4e044f46e137e /include/CMakeLists.txt
parent79ddd86615e387f53c973a0cac34ae077655ccea (diff)
downloadmariadb-git-3878baddf13efcee656ce2ad970a8326c7305fba.tar.gz
MDEV-13773 client packages need my_global.h and/or my_config.h
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index e47522a4931..8af7a1281b1 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -93,3 +93,22 @@ 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_config.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>
+")