summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMagnus Blåudd <magnus.blaudd@sun.com>2009-10-08 14:54:11 +0200
committerMagnus Blåudd <magnus.blaudd@sun.com>2009-10-08 14:54:11 +0200
commit805136fd2ba0599de4718b465c4c53f30469d857 (patch)
treec2a1e6aad3ecbcf33bed2f0cabd6252e7aa30136 /storage
parent0b1fdf0bd8782757a07efca2c0fc231734e362c4 (diff)
downloadmariadb-git-805136fd2ba0599de4718b465c4c53f30469d857.tar.gz
Bug #47797 CMake, engine can't specify additional libraries to link with
- Make it possible for the CmakeLists.txt files in an engine to use ${engine}_LIBS to set additional libraries to link with Example: NDBCLUSTER_LIBS = ndbclient
Diffstat (limited to 'storage')
-rw-r--r--storage/mysql_storage_engine.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/mysql_storage_engine.cmake b/storage/mysql_storage_engine.cmake
index bb368494898..af8c3a85cd1 100644
--- a/storage/mysql_storage_engine.cmake
+++ b/storage/mysql_storage_engine.cmake
@@ -7,6 +7,8 @@
# Remarks:
# ${engine}_SOURCES variable containing source files to produce the library must set before
# calling this macro
+# ${engine}_LIBS variable containing extra libraries to link with may be set
+
MACRO(MYSQL_STORAGE_ENGINE engine)
IF(NOT SOURCE_SUBLIBS)
@@ -22,6 +24,9 @@ IF(NOT SOURCE_SUBLIBS)
#Create static library. The name of the library is <storage_engine>.lib
ADD_LIBRARY(${libname} ${${engine}_SOURCES})
ADD_DEPENDENCIES(${libname} GenError)
+ IF(${engine}_LIBS)
+ TARGET_LINK_LIBRARIES(${libname} ${${engine}_LIBS})
+ ENDIF(${engine}_LIBS)
MESSAGE("build ${engine} as static library")
ELSEIF(${ENGINE_BUILD_TYPE} STREQUAL "DYNAMIC")
ADD_DEFINITIONS(-DMYSQL_DYNAMIC_PLUGIN)
@@ -30,6 +35,9 @@ IF(NOT SOURCE_SUBLIBS)
SET(dyn_libname ha_${libname})
ADD_LIBRARY(${dyn_libname} SHARED ${${engine}_SOURCES})
TARGET_LINK_LIBRARIES (${dyn_libname} mysqld)
+ IF(${engine}_LIBS)
+ TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
+ ENDIF(${engine}_LIBS)
MESSAGE("build ${engine} as DLL")
ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
ENDIF(NOT SOURCE_SUBLIBS)