From: Dyre Tjeldvoll Date: January 11 2013 9:58am Subject: bzr push into mysql-5.5-cluster-7.2 branch (Dyre.Tjeldvoll:4152 to 4153) List-Archive: http://lists.mysql.com/commits/145597 Message-Id: <20130111095816.9815.38410.4153@khepri17.no.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4153 Dyre Tjeldvoll 2013-01-11 Enable standalone cmake of mcc dir modified: storage/ndb/mcc/CMakeLists.txt storage/ndb/mcc/frontend/CMakeLists.txt storage/ndb/mcc/host_info/CMakeLists.txt 4152 Dyre Tjeldvoll 2013-01-11 Add trailing slash to Python path so that last pythonXY component is stripped off modified: storage/ndb/mcc/CMakeLists.txt === modified file 'storage/ndb/mcc/CMakeLists.txt' --- a/storage/ndb/mcc/CMakeLists.txt 2013-01-11 09:06:36 +0000 +++ b/storage/ndb/mcc/CMakeLists.txt 2013-01-11 09:57:36 +0000 @@ -38,9 +38,10 @@ set(MCC_LAUNCH_BASE "setup") # Check if we are running cmake standalone, or as part of Cluster if(NOT DEFAULT_MYSQL_HOME) - PROJECT(mcc) #Temorary - remove when part of Cluster CMake system + PROJECT(mcc) cmake_minimum_required(VERSION 2.6) enable_testing() + set(WITH_MCC_DEFAULT "ON") set(MCC_INSTALL_SUBDIR ".") set(MCC_INSTALL_BINDIR "bin") === modified file 'storage/ndb/mcc/frontend/CMakeLists.txt' --- a/storage/ndb/mcc/frontend/CMakeLists.txt 2012-12-06 14:03:02 +0000 +++ b/storage/ndb/mcc/frontend/CMakeLists.txt 2013-01-11 09:57:36 +0000 @@ -13,6 +13,15 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +if(NOT DEFAULT_MYSQL_HOME) + # If not building as part of Cluster we don't have the CREATE_ZIP + # macro available, so we just install dojo normally + install(DIRECTORY "." + DESTINATION "${MCC_INSTALL_SUBDIR}/frontend" + COMPONENT ClusterTools) + return() +endif() + INCLUDE("${NDB_SOURCE_DIR}/config/type_mcc_utils.cmake") SET(DOJO_ARCHIVE "${CMAKE_CURRENT_BINARY_DIR}/dojo.zip") === modified file 'storage/ndb/mcc/host_info/CMakeLists.txt' --- a/storage/ndb/mcc/host_info/CMakeLists.txt 2012-12-06 14:03:02 +0000 +++ b/storage/ndb/mcc/host_info/CMakeLists.txt 2013-01-11 09:57:36 +0000 @@ -78,9 +78,26 @@ endif(HAVE_WINDOWS_H) configure_file("config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/host_info_config.h") include_directories(${CMAKE_CURRENT_BINARY_DIR}) -MYSQL_ADD_EXECUTABLE(host_info host_info.c - DESTINATION "${MCC_INSTALL_SUBDIR}/host_info/${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}" - COMPONENT ClusterTools) +if(DEFAULT_MYSQL_HOME) + MYSQL_ADD_EXECUTABLE(host_info host_info.c + DESTINATION "${MCC_INSTALL_SUBDIR}/host_info/${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}" + COMPONENT ClusterTools) +else() + # If not building as part of Cluster we don't have the + # MYSQL_ADD_EXECUTABLE macro available, so we just use the normal + # add_executable command... + add_executable(host_info host_info.c) + + # ... and install the old way + # "Install" binary for this host into source tree + install(TARGETS host_info + DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/binaries/${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}") + + # Install all binaries in source tree into install dir/package + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/binaries" + DESTINATION "${MCC_INSTALL_SUBDIR}/host_info" + USE_SOURCE_PERMISSIONS) +endif() if (FALSE) add_custom_command(TARGET host_info POST_BUILD No bundle (reason: useless for push emails).