Commit 42049f9d authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: simplify install_layout.cmake

parent a5b38151
...@@ -139,11 +139,10 @@ SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d") ...@@ -139,11 +139,10 @@ SET(INSTALL_SYSCONF2DIR_RPM "/etc/my.cnf.d")
# #
IF(CMAKE_SIZEOF_VOID_P EQUAL 8) IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(INSTALL_LIBDIR_RPM "lib64") SET(INSTALL_LIBDIR_RPM "lib64")
SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
ELSE() ELSE()
SET(INSTALL_LIBDIR_RPM "lib") SET(INSTALL_LIBDIR_RPM "lib")
SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF() ENDIF()
SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin")
# #
SET(INSTALL_INCLUDEDIR_RPM "include/mysql") SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
# #
...@@ -235,17 +234,18 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "") ...@@ -235,17 +234,18 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
# Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR # Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR
# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
# layout is chosen) # layout is chosen)
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2 GET_CMAKE_PROPERTY(ALL_VARS VARIABLES)
INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR FOREACH (V ${ALL_VARS})
SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES) IF (V MATCHES "^(INSTALL_([A-Z_0-9]+)DIR)_${INSTALL_LAYOUT}$")
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} SET(var ${CMAKE_MATCH_1})
CACHE STRING "${var} installation directory" ${FORCE}) SET(${var} "${${V}}" CACHE STRING "${CMAKE_MATCH_2} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR) MARK_AS_ADVANCED(${var})
IF(IS_ABSOLUTE ${INSTALL_${var}DIR}) IF(IS_ABSOLUTE "${${var}}")
SET(INSTALL_${var}DIRABS ${INSTALL_${var}DIR}) SET(${var}ABS "${${var}}")
ELSE() ELSE()
SET(INSTALL_${var}DIRABS "${CMAKE_INSTALL_PREFIX}/${INSTALL_${var}DIR}") SET(${var}ABS "${CMAKE_INSTALL_PREFIX}/${${var}}")
ENDIF()
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment