summaryrefslogtreecommitdiff
path: root/cmake/install_macros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r--cmake/install_macros.cmake30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 14e43ee5e95..9f4148342a7 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -130,6 +130,36 @@ FUNCTION(INSTALL_SCRIPT)
INSTALL_MANPAGE(${script})
ENDFUNCTION()
+
+FUNCTION(INSTALL_DOCUMENTATION)
+ MYSQL_PARSE_ARGUMENTS(ARG "COMPONENT" "" ${ARGN})
+ SET(files ${ARG_DEFAULT_ARGS})
+ IF(NOT ARG_COMPONENT)
+ SET(ARG_COMPONENT Server)
+ ENDIF()
+ IF (ARG_COMPONENT MATCHES "Readme")
+ SET(destination ${INSTALL_DOCREADMEDIR})
+ ELSE()
+ SET(destination ${INSTALL_DOCDIR})
+ ENDIF()
+
+ STRING(TOUPPER ${ARG_COMPONENT} COMPUP)
+ IF(CPACK_COMPONENT_${COMPUP}_GROUP)
+ SET(group ${CPACK_COMPONENT_${COMPUP}_GROUP})
+ ELSE()
+ SET(group ${ARG_COMPONENT})
+ ENDIF()
+
+ IF(RPM)
+ SET(destination "${destination}/MariaDB-${group}-${VERSION}")
+ ELSEIF(DEB)
+ SET(destination "${destination}/mariadb-${group}-${MAJOR_VERSION}.${MINOR_VERSION}")
+ ENDIF()
+
+ INSTALL(FILES ${files} DESTINATION ${destination} COMPONENT ${ARG_COMPONENT})
+ENDFUNCTION()
+
+
# Install symbolic link to CMake target.
# the link is created in the same directory as target
# and extension will be the same as for target file.