summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJonathan Perkin <jonathan.perkin@oracle.com>2010-04-01 13:35:16 +0200
committerJonathan Perkin <jonathan.perkin@oracle.com>2010-04-01 13:35:16 +0200
commitf037ad4fbf1ed87254d36e94f4368cfb348d8248 (patch)
tree245f7a3539daa9586d494e3dd95d5f0e26d18932 /CMakeLists.txt
parent2785be2d708c17dc9138b9f58f288cbe4f660ee3 (diff)
downloadmariadb-git-f037ad4fbf1ed87254d36e94f4368cfb348d8248.tar.gz
Try to fix datadir
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd4f4a80516..889dc463769 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,8 +189,11 @@ ELSE()
ENDIF()
SET(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")
-SET(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/${INSTALL_MYSQLDATADIR}" CACHE PATH
- "default MySQL data directory")
+IF(INSTALL_MYSQLDATADIR MATCHES "^/.*")
+ SET(MYSQL_DATADIR ${INSTALL_MYSQLDATADIR} CACHE PATH "default MySQL data directory")
+ELSE()
+ SET(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/${INSTALL_MYSQLDATADIR}" CACHE PATH "default MySQL data directory")
+ENDIF()
SET(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(SYSCONFDIR)