#At file:///home/msvensson/mysql/7.0/ based on revid:magnus.blaudd@stripped
3893 Magnus Blåudd 2010-10-22
ndb
- add compatitbiltiy code to detect if using the MySQL Server util library for cmake
or the one included with ndb
modified:
storage/ndb/CMakeLists.txt
=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt 2010-10-19 13:51:20 +0000
+++ b/storage/ndb/CMakeLists.txt 2010-10-22 12:28:02 +0000
@@ -13,7 +13,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-INCLUDE("${CMAKE_SOURCE_DIR}/storage/ndb/cmake/libutils.cmake")
+IF(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/)
+ # No MySQL Server cmake support, use the version in storage/ndb/cmake
+ INCLUDE("${CMAKE_SOURCE_DIR}/storage/ndb/cmake/libutils.cmake")
+ENDIF()
OPTION(WITH_NDB_TEST
"Include the NDB Cluster ndbapi test programs" OFF)
@@ -74,13 +77,22 @@ IF(WITHOUT_PARTITION_STORAGE_ENGINE)
MESSAGE(FATAL_ERROR "NDBCLUSTER can't be compiled without PARTITION")
ENDIF(WITHOUT_PARTITION_STORAGE_ENGINE)
-INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/include)
SET(NDBCLUSTER_SOURCES
- ../../sql/ha_ndbcluster.cc
- ../../sql/ha_ndbcluster_cond.cc
- ../../sql/ha_ndbcluster_connection.cc
- ../../sql/ha_ndbcluster_binlog.cc
- ../../sql/ha_ndbinfo.cc)
-SET(NDBCLUSTER_LIBS ndbclient)
-MYSQL_STORAGE_ENGINE(NDBCLUSTER)
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_cond.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_connection.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbcluster_binlog.cc
+ ${CMAKE_SOURCE_DIR}/sql/ha_ndbinfo.cc)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/include)
+
+
+IF(EXISTS ${SOURCE_DIR}/storage/mysql_storage_engine.cmake)
+ # Old plugin support on Windows only
+ INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
+ SET(NDBCLUSTER_LIBS ndbclient)
+ MYSQL_STORAGE_ENGINE(NDBCLUSTER)
+ELSE()
+ # New plugin support, cross-platform
+ MYSQL_ADD_PLUGIN(ndbcluster ${NDBCLUSTER_SOURCES} STORAGE_ENGINE
+ DEFAULT MODULE_OUTPUT_NAME ha_ndb)
+ENDIF()
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20101022122802-2bp4omqasoc01d5k.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:3893) | Magnus Blåudd | 22 Oct |