diff options
author | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-10-08 15:19:24 +0200 |
---|---|---|
committer | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-10-08 15:19:24 +0200 |
commit | 28bdd6e69d4e0b8d98e7725a421165c5d23951e5 (patch) | |
tree | b258cdc33234528b501db66d1379b1df1715e7ec /libmysqld | |
parent | 805136fd2ba0599de4718b465c4c53f30469d857 (diff) | |
download | mariadb-git-28bdd6e69d4e0b8d98e7725a421165c5d23951e5.tar.gz |
Bug #47795 CMake, storage engine name different from directory name
- Read plug.in to fid the name of the engine to link with, does not have
to be same as engine dir
- Use engine dir when figuring out which libraries to build limbysqld with
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index bea6f6c0e1f..db398258b69 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -90,10 +90,11 @@ ENDFOREACH(rpath) FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS}) - INCLUDE(${CMAKE_SOURCE_DIR}/storage/${ENGINE_LIB}/CMakeLists.txt) STRING(TOUPPER ${ENGINE_LIB} ENGINE_LIB_UPPER) + SET(ENGINE_DIR ${${ENGINE_LIB_UPPER}_DIR}) + INCLUDE(${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/CMakeLists.txt) FOREACH(rpath ${${ENGINE_LIB_UPPER}_SOURCES}) - SET(LIB_SOURCES ${LIB_SOURCES} ${CMAKE_SOURCE_DIR}/storage/${ENGINE_LIB}/${rpath}) + SET(LIB_SOURCES ${LIB_SOURCES} ${CMAKE_SOURCE_DIR}/storage/${ENGINE_DIR}/${rpath}) ENDFOREACH(rpath) ENDFOREACH(ENGINE_LIB) @@ -155,6 +156,14 @@ ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES}) ADD_DEPENDENCIES(mysqlserver GenServerSource GenError) TARGET_LINK_LIBRARIES(mysqlserver) +# Add any additional libraries requested by engine(s) +FOREACH (ENGINE_LIB ${MYSQLD_STATIC_ENGINE_LIBS}) + STRING(TOUPPER ${ENGINE_LIB} ENGINE_LIB_UPPER) + IF(${ENGINE_LIB_UPPER}_LIBS) + TARGET_LINK_LIBRARIES(mysqlserver ${${ENGINE_LIB_UPPER}_LIBS}) + ENDIF(${ENGINE_LIB_UPPER}_LIBS) +ENDFOREACH(ENGINE_LIB) + ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def) ADD_DEPENDENCIES(libmysqld mysqlserver) TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32) |