summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-10-26 17:16:18 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-10-26 17:16:18 +0100
commit1dd88254be6aeb652389111fb358f776ceb054e8 (patch)
treedc57bf09bdbcf91a93a1d04fb8cf4113cafe41f4 /storage
parent75116feb4b8976df3078f288f31fec7f46462461 (diff)
downloadmariadb-git-1dd88254be6aeb652389111fb358f776ceb054e8.tar.gz
Bug #48317 cannot build innodb as static library.
The problem here is that the latest innodb push contains both MYSQL_STORAGE_ENGINE(INNOBASE) and MYSQL_STORAGE_ENGINE(INNOBASE) in the same CMakeLists.txt, to make the resulting library ha_innodb.dll, instead of ha_innobase.dll. Using multiple MYSQL_STORAGE_ENGINE within the same CMakeLists.txt conflicts with the fix for the bug Bug #47795 "CMake, storage engine name different from directory name". Top-level CMakeLists.txt now parses storage engine's CMakeLists.txt to extract engines name from MYSQL_STORAGE_ENGINE(). For innodb, it concludes that there is not storage engine named INNOBASE, hence WITH_INNOBASE_STORAGE_ENGINE has no effect. The fix is to use SET_TARGET_PROPERTIES(... PROPERTIES OUTPUT_NAME ...), instead of renaming the engine to have plugins named ha_innodb.dll.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 57ad7f4b28c..d67b518642c 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -86,12 +86,12 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
IF (MYSQL_VERSION_ID GREATER "50137")
- IF (WITH_INNOBASE_STORAGE_ENGINE)
- MYSQL_STORAGE_ENGINE(INNOBASE)
- ELSE (WITH_INNOBASE_STORAGE_ENGINE)
- SET (INNODB_SOURCES ${INNOBASE_SOURCES})
- MYSQL_STORAGE_ENGINE(INNODB)
- ENDIF (WITH_INNOBASE_STORAGE_ENGINE)
+ MYSQL_STORAGE_ENGINE(INNOBASE)
+ # Use ha_innodb for plugin name, if plugin is built
+ GET_TARGET_PROPERTY(LIB_LOCATION ha_innobase LOCATION)
+ IF(LIB_LOCATION)
+ SET_TARGET_PROPERTIES(ha_innobase PROPERTIES OUTPUT_NAME ha_innodb)
+ ENDIF(LIB_LOCATION)
ELSE (MYSQL_VERSION_ID GREATER "50137")
IF (NOT SOURCE_SUBLIBS)
ADD_DEFINITIONS(-D_WIN32 -DMYSQL_SERVER)