#At file:///H:/bzr/nmr/ based on revid:alik@stripped
2899 Vladislav Vaintroub 2009-10-26
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.
modified:
storage/innobase/CMakeLists.txt
=== modified file 'storage/innobase/CMakeLists.txt'
--- a/storage/innobase/CMakeLists.txt 2009-10-20 20:24:42 +0000
+++ b/storage/innobase/CMakeLists.txt 2009-10-26 16:16:18 +0000
@@ -86,12 +86,12 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/b
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)
Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20091026161618-6kcsyg1ukl85rwzz.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5.0-next-mr branch (vvaintroub:2899) Bug#48317 | Vladislav Vaintroub | 26 Oct |