summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJonathan Perkin <jonathan.perkin@oracle.com>2010-05-06 15:20:14 +0200
committerJonathan Perkin <jonathan.perkin@oracle.com>2010-05-06 15:20:14 +0200
commite31887f2ed9a5dd58345f8fd6d28e0729710ac96 (patch)
treeacac85b39c1628cf7c98be83f757c78fe161fcc4 /cmake
parentaf941670abbb84b32cdb80a4c87e95a5d5594895 (diff)
downloadmariadb-git-e31887f2ed9a5dd58345f8fd6d28e0729710ac96.tar.gz
Tidy install layout.
Remove 'ROOT' from sql-bench dir variable, it's unnecessary.
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/install_layout.cmake187
1 files changed, 106 insertions, 81 deletions
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
index 296bebd3bb0..ade6cdb747f 100755
--- a/cmake/install_layout.cmake
+++ b/cmake/install_layout.cmake
@@ -40,18 +40,25 @@
#
# - INSTALL_BINDIR (directory with client executables and scripts)
# - INSTALL_SBINDIR (directory with mysqld)
+# - INSTALL_SCRIPTDIR (several scripts, rarely used)
+#
# - INSTALL_LIBDIR (directory with client end embedded libraries)
# - INSTALL_PLUGINDIR (directory for plugins)
+#
# - INSTALL_INCLUDEDIR (directory for MySQL headers)
+#
# - INSTALL_DOCDIR (documentation)
+# - INSTALL_DOCREADMEDIR (readme and similar)
# - INSTALL_MANDIR (man pages)
-# - INSTALL_SCRIPTDIR (several scripts, rarely used)
-# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
+# - INSTALL_INFODIR (info pages)
+#
# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
-# - INSTALL_SQLBENCHDIR (sql-bench)
+# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
# - INSTALL_MYSQLTESTDIR (mysql-test)
-# - INSTALL_DOCREADMEDIR (readme and similar)
-# - INSTALL_SUPPORTFILESDIR (used only in standalone installer)
+# - INSTALL_SQLBENCHDIR (sql-bench)
+# - INSTALL_SUPPORTFILESDIR (various extra support files)
+#
+# - INSTALL_MYSQLDATADIR (data directory)
IF(NOT INSTALL_LAYOUT)
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
@@ -60,15 +67,6 @@ ENDIF()
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
-#IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
-# IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
-# # XXX not keen on this, how many more will we need? prefer to just bail...
-# IF(NOT INSTALL_LAYOUT MATCHES "SVR4")
-# SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
-# ENDIF()
-# ENDIF()
-#ENDIF()
-
IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "RPM")
SET(default_prefix "/usr")
@@ -90,84 +88,111 @@ IF(UNIX)
MARK_AS_ADVANCED(SYSCONFDIR)
ENDIF()
+#
# STANDALONE layout
-SET(INSTALL_BINDIR_STANDALONE "bin")
-SET(INSTALL_SBINDIR_STANDALONE "bin")
-SET(INSTALL_LIBDIR_STANDALONE "lib")
-SET(INSTALL_INCLUDEDIR_STANDALONE "include")
-SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
-SET(INSTALL_DOCDIR_STANDALONE "docs")
-SET(INSTALL_MANDIR_STANDALONE "man")
-SET(INSTALL_INFODIR_STANDALONE "docs")
-SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
-SET(INSTALL_SHAREDIR_STANDALONE "share")
-SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
-SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
-SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
-SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
-SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
-SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
+#
+SET(INSTALL_BINDIR_STANDALONE "bin")
+SET(INSTALL_SBINDIR_STANDALONE "bin")
+SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
+#
+SET(INSTALL_LIBDIR_STANDALONE "lib")
+SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_STANDALONE "include")
+#
+SET(INSTALL_DOCDIR_STANDALONE "docs")
+SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
+SET(INSTALL_MANDIR_STANDALONE "man")
+SET(INSTALL_INFODIR_STANDALONE "docs")
+#
+SET(INSTALL_SHAREDIR_STANDALONE "share")
+SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
+SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
+SET(INSTALL_SQLBENCHDIR_STANDALONE ".")
+SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
#
# RPM layout
#
-SET(INSTALL_BINDIR_RPM "bin")
-SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
+SET(INSTALL_BINDIR_RPM "bin")
+SET(INSTALL_SBINDIR_RPM "sbin")
+SET(INSTALL_SCRIPTDIR_RPM "bin")
+#
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
- SET(INSTALL_LIBDIR_RPM "lib64")
+ SET(INSTALL_LIBDIR_RPM "lib64")
+ SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
ELSE()
- SET(INSTALL_LIBDIR_RPM "lib")
+ SET(INSTALL_LIBDIR_RPM "lib")
+ SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF()
-SET(INSTALL_SBINDIR_RPM "sbin")
-SET(INSTALL_SHAREDIR_RPM "share")
-#
-#SET(INSTALL_DOCDIR_RPM "XXXunset")
-#SET(INSTALL_DOCREADMEDIR_RPM "${INSTALL_DOCDIR_RPM}")
-SET(INSTALL_INFODIR_RPM "${INSTALL_SHAREDIR_RPM}/info")
-SET(INSTALL_MANDIR_RPM "${INSTALL_SHAREDIR_RPM}/man")
-SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")
-SET(INSTALL_MYSQLSHAREDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql")
-SET(INSTALL_MYSQLTESTDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql-test")
-SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin")
-SET(INSTALL_SCRIPTDIR_RPM "${INSTALL_BINDIR_RPM}")
-SET(INSTALL_SQLBENCHROOTDIR_RPM "")
-SET(INSTALL_SUPPORTFILESDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql")
+#
+SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
+#
+#SET(INSTALL_DOCDIR_RPM unset - installed directly by RPM)
+#SET(INSTALL_DOCREADMEDIR_RPM unset - installed directly by RPM)
+SET(INSTALL_INFODIR_RPM "share/info")
+SET(INSTALL_MANDIR_RPM "share/man")
+#
+SET(INSTALL_SHAREDIR_RPM "share")
+SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
+SET(INSTALL_MYSQLTESTDIR_RPM "share/mysql-test")
+SET(INSTALL_SQLBENCHDIR_RPM "")
+SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
+#
+SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")
+#
# DEB layout
-SET(INSTALL_BINDIR_DEB "bin")
-SET(INSTALL_SBINDIR_DEB "bin")
-SET(INSTALL_LIBDIR_DEB "lib")
-SET(INSTALL_INCLUDEDIR_DEB "include")
-SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
-SET(INSTALL_DOCDIR_DEB "docs")
-SET(INSTALL_MANDIR_DEB "man")
-SET(INSTALL_INFODIR_DEB "docs")
-SET(INSTALL_MYSQLSHAREDIR_DEB "share")
-SET(INSTALL_SHAREDIR_DEB "share")
-SET(INSTALL_SCRIPTDIR_DEB "scripts")
-SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
-SET(INSTALL_SQLBENCHROOTDIR_DEB ".")
-SET(INSTALL_DOCREADMEDIR_DEB ".")
-SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
-SET(INSTALL_MYSQLDATADIR_DEB "data")
+#
+SET(INSTALL_BINDIR_DEB "bin")
+SET(INSTALL_SBINDIR_DEB "bin")
+SET(INSTALL_SCRIPTDIR_DEB "scripts")
+#
+SET(INSTALL_LIBDIR_DEB "lib")
+SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_DEB "include")
+#
+SET(INSTALL_DOCDIR_DEB "docs")
+SET(INSTALL_DOCREADMEDIR_DEB ".")
+SET(INSTALL_MANDIR_DEB "man")
+SET(INSTALL_INFODIR_DEB "docs")
+#
+SET(INSTALL_SHAREDIR_DEB "share")
+SET(INSTALL_MYSQLSHAREDIR_DEB "share")
+SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
+SET(INSTALL_SQLBENCHDIR_DEB ".")
+SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_DEB "data")
+#
# SVR4 layout
-SET(INSTALL_BINDIR_SVR4 "bin")
-SET(INSTALL_SBINDIR_SVR4 "bin")
-SET(INSTALL_LIBDIR_SVR4 "lib")
-SET(INSTALL_INCLUDEDIR_SVR4 "include")
-SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
-SET(INSTALL_DOCDIR_SVR4 "docs")
-SET(INSTALL_MANDIR_SVR4 "man")
-SET(INSTALL_INFODIR_SVR4 "docs")
-SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
-SET(INSTALL_SHAREDIR_SVR4 "share")
-SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
-SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
-SET(INSTALL_SQLBENCHROOTDIR_SVR4 ".")
-SET(INSTALL_DOCREADMEDIR_SVR4 ".")
-SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
-SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql")
+#
+SET(INSTALL_BINDIR_SVR4 "bin")
+SET(INSTALL_SBINDIR_SVR4 "bin")
+SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
+#
+SET(INSTALL_LIBDIR_SVR4 "lib")
+SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_SVR4 "include")
+#
+SET(INSTALL_DOCDIR_SVR4 "docs")
+SET(INSTALL_DOCREADMEDIR_SVR4 ".")
+SET(INSTALL_MANDIR_SVR4 "man")
+SET(INSTALL_INFODIR_SVR4 "docs")
+#
+SET(INSTALL_SHAREDIR_SVR4 "share")
+SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
+SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
+SET(INSTALL_SQLBENCHDIR_SVR4 ".")
+SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql")
+
# Clear cached variables if install layout was changed
IF(OLD_INSTALL_LAYOUT)
@@ -181,7 +206,7 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
# layout is chosen)
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
- INFO MYSQLTEST SQLBENCHROOT DOCREADME SUPPORTFILES MYSQLDATA)
+ INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
CACHE STRING "${var} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR)