diff options
author | Alexander Barkov <bar@mariadb.org> | 2013-04-25 17:12:52 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2013-04-25 17:12:52 +0400 |
commit | bc80fb07ded7abcfb99d368d14e4c5e81a669101 (patch) | |
tree | 4ad02b3ecbc9d357c7d6a18c55e97103da1d0eb4 /storage/cassandra | |
parent | 616e7a7466d2a9bceec9b2c968ce5cbf8035eba4 (diff) | |
download | mariadb-git-bc80fb07ded7abcfb99d368d14e4c5e81a669101.tar.gz |
ha_cassandra.so and ha_oqgraph.so can be build only if boost is installed
on the build machine. So put them into the deb packages optionally.
Additionally, fixing cassandra/CMakeLists.txt to work with thrift
installed in /opt/local and /opt. It was supposed to work, but did
not work actually. Only thrift installed in /usr or /usr/local worked.
renamed:
debian/dist/Debian/mariadb-server-10.0.files => debian/dist/Debian/mariadb-server-10.0.files.in
debian/dist/Ubuntu/mariadb-server-10.0.files => debian/dist/Ubuntu/mariadb-server-10.0.files.in
modified:
.bzrignore
CMakeLists.txt
storage/cassandra/CMakeLists.txt
storage/cassandra/cassandra_se.cc
storage/cassandra/gen-cpp/Cassandra.h
storage/cassandra/gen-cpp/cassandra_types.h
storage/oqgraph/CMakeLists.txt
debian/dist/Debian/mariadb-server-10.0.files.in
debian/dist/Ubuntu/mariadb-server-10.0.files.in
Diffstat (limited to 'storage/cassandra')
-rw-r--r-- | storage/cassandra/CMakeLists.txt | 8 | ||||
-rw-r--r-- | storage/cassandra/cassandra_se.cc | 12 | ||||
-rw-r--r-- | storage/cassandra/gen-cpp/Cassandra.h | 2 | ||||
-rw-r--r-- | storage/cassandra/gen-cpp/cassandra_types.h | 8 |
4 files changed, 17 insertions, 13 deletions
diff --git a/storage/cassandra/CMakeLists.txt b/storage/cassandra/CMakeLists.txt index 5975246233e..63e413ccb7b 100644 --- a/storage/cassandra/CMakeLists.txt +++ b/storage/cassandra/CMakeLists.txt @@ -10,6 +10,7 @@ ${Thrift_INCLUDE_DIR} # this may be set ) # Verify that thrift linking library is found +SET(Thrift_LIB_PATHS ${Thrift_LIB_PATHS} /usr/local/lib /opt/local/lib /opt/lib) FIND_LIBRARY(Thrift_LIBS NAMES thrift PATHS ${Thrift_LIB_PATHS} ${Thrift_LIB}) IF(EXISTS ${Thrift_LIBS}) GET_FILENAME_COMPONENT(LINK_DIR ${Thrift_LIBS} PATH ABSOLUTE) @@ -17,15 +18,16 @@ ELSE() RETURN() ENDIF() -INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..) SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS}) STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..") CHECK_CXX_SOURCE_COMPILES( " -#include <Thrift.h> +#include <thrift/Thrift.h> #include <boost/shared_ptr.hpp> int main() { boost::shared_ptr<char> p(new char(10)); @@ -48,6 +50,8 @@ IF(CASSANDRASE_OK) LINK_DIRECTORIES(${LINK_DIR}) + SET(CASSANDRA_DEB_FILES "usr/lib/mysql/plugin/ha_cassandra.so" PARENT_SCOPE) + MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine) IF (INSTALL_SYSCONFDIR) INSTALL(FILES cassandra.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d diff --git a/storage/cassandra/cassandra_se.cc b/storage/cassandra/cassandra_se.cc index 0d62c5af7a6..6ae3b7e3609 100644 --- a/storage/cassandra/cassandra_se.cc +++ b/storage/cassandra/cassandra_se.cc @@ -6,12 +6,12 @@ #include <stdio.h> #include <stdarg.h> -#include "Thrift.h" -#include "transport/TSocket.h" -#include "transport/TTransport.h" -#include "transport/TBufferTransports.h" -#include "protocol/TProtocol.h" -#include "protocol/TBinaryProtocol.h" +#include "thrift/Thrift.h" +#include "thrift/transport/TSocket.h" +#include "thrift/transport/TTransport.h" +#include "thrift/transport/TBufferTransports.h" +#include "thrift/protocol/TProtocol.h" +#include "thrift/protocol/TBinaryProtocol.h" #include "gen-cpp/Cassandra.h" // cassandra includes end diff --git a/storage/cassandra/gen-cpp/Cassandra.h b/storage/cassandra/gen-cpp/Cassandra.h index 2040cc63aa2..b98570043a9 100644 --- a/storage/cassandra/gen-cpp/Cassandra.h +++ b/storage/cassandra/gen-cpp/Cassandra.h @@ -7,7 +7,7 @@ #ifndef Cassandra_H #define Cassandra_H -#include <TProcessor.h> +#include <thrift/TProcessor.h> #include "cassandra_types.h" namespace org { namespace apache { namespace cassandra { diff --git a/storage/cassandra/gen-cpp/cassandra_types.h b/storage/cassandra/gen-cpp/cassandra_types.h index d675198dcc8..226c5fa570a 100644 --- a/storage/cassandra/gen-cpp/cassandra_types.h +++ b/storage/cassandra/gen-cpp/cassandra_types.h @@ -10,10 +10,10 @@ #include <inttypes.h> #include <netinet/in.h> -#include <Thrift.h> -#include <TApplicationException.h> -#include <protocol/TProtocol.h> -#include <transport/TTransport.h> +#include <thrift/Thrift.h> +#include <thrift/TApplicationException.h> +#include <thrift/protocol/TProtocol.h> +#include <thrift/transport/TTransport.h> |