summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-10-19 17:36:19 +0400
committerAlexander Nozdrin <alik@sun.com>2009-10-19 17:36:19 +0400
commitbd60794fd8e532616f5b5f6d2200af0f4c7bc5ef (patch)
treeab9b420b768d8a6eb5ccda680604108cfee71b81 /CMakeLists.txt
parent6b684c5806e0728b42c5c0ab7ae9939ab9dfec93 (diff)
parent03bf73de2fc2df414cafff03c8aaf3a58a3e7e48 (diff)
downloadmariadb-git-bd60794fd8e532616f5b5f6d2200af0f4c7bc5ef.tar.gz
Merge from mysql-trunk-merge.
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aea618a0f3a..22289507a02 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,12 +221,16 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS)
FILE(GLOB STORAGE_SUBDIRS storage/*)
FOREACH(SUBDIR ${STORAGE_SUBDIRS})
FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/storage ${SUBDIR})
- STRING(TOUPPER ${DIRNAME} ENGINE)
- STRING(TOLOWER ${DIRNAME} ENGINE_LOWER)
IF (EXISTS ${SUBDIR}/CMakeLists.txt)
# Check MYSQL_STORAGE_ENGINE macro is present
FILE(STRINGS ${SUBDIR}/CMakeLists.txt HAVE_STORAGE_ENGINE REGEX MYSQL_STORAGE_ENGINE)
IF(HAVE_STORAGE_ENGINE)
+ # Extract name of engine from HAVE_STORAGE_ENGINE
+ STRING(REGEX REPLACE ".*MYSQL_STORAGE_ENGINE\\((.*\)\\).*"
+ "\\1" ENGINE_NAME ${HAVE_STORAGE_ENGINE})
+ STRING(TOUPPER ${ENGINE_NAME} ENGINE)
+ STRING(TOLOWER ${ENGINE_NAME} ENGINE_LOWER)
+
SET(ENGINE_BUILD_TYPE "DYNAMIC")
# Read plug.in to find out if a plugin is mandatory and whether it supports
# build as shared library (dynamic).
@@ -252,6 +256,7 @@ FOREACH(SUBDIR ${STORAGE_SUBDIRS})
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${ENGINE_LOWER})
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
+ SET (${ENGINE}_DIR ${DIRNAME})
ENDIF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
ENDIF(EXISTS ${SUBDIR}/plug.in)