diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-05 02:36:10 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-05 02:36:10 +0200 |
commit | aa8f0606e809f19c23f918286cbfefc5a4172072 (patch) | |
tree | 2377e0d017ccbdc5a49bdfe72e5b45d3b064902d /plugin | |
parent | 2115542294496c7a6e2acb70fc1405972c304f5c (diff) | |
download | mariadb-git-aa8f0606e809f19c23f918286cbfefc5a4172072.tar.gz |
MDEV-255: Compile handlersocket plugin in 5.5
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/handler_socket/CMakeLists.txt | 41 | ||||
-rw-r--r-- | plugin/handler_socket/handlersocket/mysql_incl.hpp | 3 |
2 files changed, 44 insertions, 0 deletions
diff --git a/plugin/handler_socket/CMakeLists.txt b/plugin/handler_socket/CMakeLists.txt new file mode 100644 index 00000000000..db232ced7ae --- /dev/null +++ b/plugin/handler_socket/CMakeLists.txt @@ -0,0 +1,41 @@ + +IF(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + # Handlersocket does not compile on Windows, compiles but does + # not start on FreeBSD. + RETURN() +ENDIF() + +#Remove -fno-implicit-templates from compiler flags(handlersocket would not work with it) +IF(CMAKE_COMPILER_IS_GNUCXX) + STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +ENDIF() + +INCLUDE_DIRECTORIES(libhsclient) + +# Handlersocket client library. We do not distribute it, +# it is just compiled in. +SET(LIBHSCLIENT_SOURCES + libhsclient/config.cpp + libhsclient/escape.cpp + libhsclient/fatal.cpp + libhsclient/hstcpcli.cpp + libhsclient/socket.cpp + libhsclient/string_util.cpp +) +ADD_CONVENIENCE_LIBRARY(hsclient ${LIBHSCLIENT_SOURCES}) +# Solaris needs to link some network libraries +TARGET_LINK_LIBRARIES(hsclient ${LIBSOCKET} ${LIBNLS} ${LIBBIND}) + +# handlersocket daemon plugin itself. +SET(HANDLERSOCKET_SOURCES + handlersocket/database.cpp + handlersocket/handlersocket.cpp + handlersocket/hstcpsvr_worker.cpp + handlersocket/hstcpsvr.cpp +) +MYSQL_ADD_PLUGIN(handlersocket + ${HANDLERSOCKET_SOURCES} + MODULE_ONLY COMPONENT Server + LINK_LIBRARIES hsclient +) + diff --git a/plugin/handler_socket/handlersocket/mysql_incl.hpp b/plugin/handler_socket/handlersocket/mysql_incl.hpp index d8dba709f28..ac937e4e74d 100644 --- a/plugin/handler_socket/handlersocket/mysql_incl.hpp +++ b/plugin/handler_socket/handlersocket/mysql_incl.hpp @@ -13,7 +13,10 @@ #define HAVE_CONFIG_H #endif +#ifndef MYSQL_DYNAMIC_PLUGIN #define MYSQL_DYNAMIC_PLUGIN +#endif + #define MYSQL_SERVER 1 #include <my_config.h> |