summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-04 15:41:52 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-04 15:41:52 +0200
commit630b0b877937cfd564251a66d2e0166182bff4ff (patch)
tree53e64734919a809c95f246504ea337ae215ff88c /storage
parentf3523559aaa5d6523d907d69de544ee24c9e6915 (diff)
downloadmariadb-git-630b0b877937cfd564251a66d2e0166182bff4ff.tar.gz
support for plugins on windows
CMakeLists.txt: 1. add -DSAFEMALLOC -DSAFE_MUTEX in the top-level CMakeLists.txt don't force plugins to copy-paste these lines in their CMakeLists.txt 2.1 search plugin/* for plugins (not only storage/*), 2.2 recognize MYSQL_PLUGIN (not only MYSQL_STORAGE_ENGINE), 2.3 extract library names from the plug.in (don't force library names to be ha_<engine>.dll and <engine>.lib) include/mysql/plugin.h: define MYSQL_PLUGIN_EXPORT appropriately (backport from 5.5) libmysqld/CMakeLists.txt: remove unnecessary workaround plugin/fulltext/CMakeLists.txt: build fulltext example plugin on windows storage/maria/CMakeLists.txt: The library is called libmaria_s.lib, not maria.lib storage/maria/unittest/CMakeLists.txt: The library is called libmaria_s.lib, not maria.lib storage/myisam/CMakeLists.txt: The library is called libmyisam_s.lib, not myisam.lib storage/mysql_storage_engine.cmake: introduce MYSQL_PLUGIN macro. don't force library names to be ha_<engine>.dll and <engine>.lib storage/xtradb/CMakeLists.txt: remove a condition from include win/README: don't use deprecated syntax win/configure-mariadb.sh: don't use deprecated syntax win/configure.js: 1. support MYSQL_PLUGIN in addition to MYSQL_STORAGE_ENGINE. 2. support plugin/* in addition to storage/*
Diffstat (limited to 'storage')
-rw-r--r--storage/maria/CMakeLists.txt22
-rw-r--r--storage/maria/unittest/CMakeLists.txt3
-rw-r--r--storage/myisam/CMakeLists.txt18
-rw-r--r--storage/mysql_storage_engine.cmake43
-rw-r--r--storage/xtradb/CMakeLists.txt10
5 files changed, 46 insertions, 50 deletions
diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt
index 43c43ccb940..ad3a64f9558 100644
--- a/storage/maria/CMakeLists.txt
+++ b/storage/maria/CMakeLists.txt
@@ -48,37 +48,37 @@ SET(MARIA_SOURCES ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c
MYSQL_STORAGE_ENGINE(MARIA)
IF(NOT SOURCE_SUBLIBS)
- ADD_DEPENDENCIES(maria GenError)
+ ADD_DEPENDENCIES(libmaria_s GenError)
ADD_EXECUTABLE(maria_ftdump maria_ftdump.c)
-TARGET_LINK_LIBRARIES(maria_ftdump maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(maria_ftdump libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(maria_chk maria_chk.c)
-TARGET_LINK_LIBRARIES(maria_chk maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(maria_chk libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(maria_read_log maria_read_log.c)
-TARGET_LINK_LIBRARIES(maria_read_log maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(maria_read_log libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(maria_pack maria_pack.c)
-TARGET_LINK_LIBRARIES(maria_pack maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(maria_pack libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(maria_dump_log maria_dump_log.c unittest/ma_loghandler_examples.c)
-TARGET_LINK_LIBRARIES(maria_dump_log maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(maria_dump_log libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(ma_test1 ma_test1.c)
-TARGET_LINK_LIBRARIES(ma_test1 maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(ma_test1 libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(ma_test2 ma_test2.c)
-TARGET_LINK_LIBRARIES(ma_test2 maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(ma_test2 libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(ma_test3 ma_test3.c)
-TARGET_LINK_LIBRARIES(ma_test3 maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(ma_test3 libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(ma_rt_test ma_rt_test.c)
-TARGET_LINK_LIBRARIES(ma_rt_test maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(ma_rt_test libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
ADD_EXECUTABLE(ma_sp_test ma_sp_test.c)
-TARGET_LINK_LIBRARIES(ma_sp_test maria myisam mysys dbug strings zlib wsock32)
+TARGET_LINK_LIBRARIES(ma_sp_test libmaria_s libmyisam_s mysys dbug strings zlib wsock32)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("maria_ftdump" "asInvoker")
diff --git a/storage/maria/unittest/CMakeLists.txt b/storage/maria/unittest/CMakeLists.txt
index a6e8736daab..715a6199185 100644
--- a/storage/maria/unittest/CMakeLists.txt
+++ b/storage/maria/unittest/CMakeLists.txt
@@ -13,10 +13,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/unittest/mytap)
-LINK_LIBRARIES(maria myisam mytap mysys dbug strings wsock32 zlib)
+LINK_LIBRARIES(libmaria_s libmyisam_s mytap mysys dbug strings wsock32 zlib)
ADD_EXECUTABLE(ma_control_file-t ma_control_file-t.c)
ADD_EXECUTABLE(trnman-t trnman-t.c)
diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt
index 2d0d1bca7a4..a9c221ff1ff 100644
--- a/storage/myisam/CMakeLists.txt
+++ b/storage/myisam/CMakeLists.txt
@@ -32,31 +32,31 @@ MYSQL_STORAGE_ENGINE(MYISAM)
IF(NOT SOURCE_SUBLIBS)
ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
- TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(myisam_ftdump libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(myisamchk myisamchk.c)
- TARGET_LINK_LIBRARIES(myisamchk myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(myisamchk libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(myisamlog myisamlog.c)
- TARGET_LINK_LIBRARIES(myisamlog myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(myisamlog libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(myisampack myisampack.c)
- TARGET_LINK_LIBRARIES(myisampack myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(myisampack libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(mi_test1 mi_test1.c)
- TARGET_LINK_LIBRARIES(mi_test1 myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(mi_test1 libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(mi_test2 mi_test2.c)
- TARGET_LINK_LIBRARIES(mi_test2 myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(mi_test2 libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(mi_test3 mi_test3.c)
- TARGET_LINK_LIBRARIES(mi_test3 myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(mi_test3 libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(sp_test sp_test.c)
- TARGET_LINK_LIBRARIES(sp_test myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(sp_test libmyisam_s mysys debug dbug strings zlib wsock32)
ADD_EXECUTABLE(rt_test rt_test.c)
- TARGET_LINK_LIBRARIES(rt_test myisam mysys debug dbug strings zlib wsock32)
+ TARGET_LINK_LIBRARIES(rt_test libmyisam_s mysys debug dbug strings zlib wsock32)
SET_TARGET_PROPERTIES(myisamchk myisampack PROPERTIES LINK_FLAGS "setargv.obj")
diff --git a/storage/mysql_storage_engine.cmake b/storage/mysql_storage_engine.cmake
index 3aba9773202..02acfdf15df 100644
--- a/storage/mysql_storage_engine.cmake
+++ b/storage/mysql_storage_engine.cmake
@@ -10,37 +10,40 @@
# ${engine}_LIBS variable containing extra libraries to link with may be set
-MACRO(MYSQL_STORAGE_ENGINE engine)
+MACRO(MYSQL_PLUGIN engine)
IF(NOT SOURCE_SUBLIBS)
# Add common include directories
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
- ${CMAKE_SOURCE_DIR}/sql
- ${CMAKE_SOURCE_DIR}/regex
- ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
STRING(TOUPPER ${engine} engine)
- STRING(TOLOWER ${engine} libname)
IF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
- ADD_DEFINITIONS(-DWITH_${engine}_STORAGE_ENGINE -DMYSQL_SERVER)
- #Create static library. The name of the library is <storage_engine>.lib
- ADD_LIBRARY(${libname} ${${engine}_SOURCES})
- ADD_DEPENDENCIES(${libname} GenError)
+ ADD_LIBRARY(${${engine}_LIB} ${${engine}_SOURCES})
+ ADD_DEPENDENCIES(${${engine}_LIB} GenError)
IF(${engine}_LIBS)
- TARGET_LINK_LIBRARIES(${libname} ${${engine}_LIBS})
+ TARGET_LINK_LIBRARIES(${${engine}_LIB} ${${engine}_LIBS})
ENDIF(${engine}_LIBS)
- MESSAGE("build ${engine} as static library")
+ MESSAGE("build ${engine} as static library (${${engine}_LIB}.lib)")
ELSEIF(${ENGINE_BUILD_TYPE} STREQUAL "DYNAMIC")
ADD_DEFINITIONS(-DMYSQL_DYNAMIC_PLUGIN)
- #Create a DLL.The name of the dll is ha_<storage_engine>.dll
- #The dll is linked to the mysqld executable
- SET(dyn_libname ha_${libname})
- ADD_LIBRARY(${dyn_libname} SHARED ${${engine}_SOURCES})
- TARGET_LINK_LIBRARIES (${dyn_libname} mysqld)
+ ADD_LIBRARY(${${engine}_LIB} SHARED ${${engine}_SOURCES})
+ TARGET_LINK_LIBRARIES (${${engine}_LIB} mysqld)
IF(${engine}_LIBS)
- TARGET_LINK_LIBRARIES(${dyn_libname} ${${engine}_LIBS})
+ TARGET_LINK_LIBRARIES(${${engine}_LIB} ${${engine}_LIBS})
ENDIF(${engine}_LIBS)
# Install the plugin
- INSTALL(TARGETS ${dyn_libname} DESTINATION lib/plugin COMPONENT runtime)
- MESSAGE("build ${engine} as DLL")
+ INSTALL(TARGETS ${${engine}_LIB} DESTINATION lib/plugin COMPONENT runtime)
+ MESSAGE("build ${engine} as DLL (${${engine}_LIB}.dll)")
+ ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
+ENDIF(NOT SOURCE_SUBLIBS)
+ENDMACRO(MYSQL_PLUGIN)
+
+MACRO(MYSQL_STORAGE_ENGINE engine)
+IF(NOT SOURCE_SUBLIBS)
+ MYSQL_PLUGIN(${engine})
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include)
+ IF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
+ ADD_DEFINITIONS(-DWITH_${engine}_STORAGE_ENGINE -DMYSQL_SERVER)
ENDIF(${ENGINE_BUILD_TYPE} STREQUAL "STATIC")
ENDIF(NOT SOURCE_SUBLIBS)
ENDMACRO(MYSQL_STORAGE_ENGINE)
diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt
index 9782f43fb27..608d6865bf4 100644
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@ -13,15 +13,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-# This is the CMakeLists for InnoDB Plugin
+# This is the CMakeLists for XtraDB
-
-
-# Starting at 5.1.38, MySQL CMake files are simplified. But the plugin
-# CMakeLists.txt still needs to work with previous versions of MySQL.
-IF (MYSQL_VERSION_ID GREATER "50137")
- INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
-ENDIF (MYSQL_VERSION_ID GREATER "50137")
+INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
SET(WIN64 TRUE)