List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:September 5 2012 8:32am
Subject:bzr push into mysql-trunk branch (tor.didriksen:4429 to 4430)
View as plain text  
 4430 Tor Didriksen	2012-09-05 [merge]
      merge 5.6 => trunk

    modified:
      CMakeLists.txt
      client/CMakeLists.txt
      cmake/ssl.cmake
      extra/CMakeLists.txt
      storage/perfschema/unittest/CMakeLists.txt
      unittest/gunit/CMakeLists.txt
 4429 Tor Didriksen	2012-09-05 [merge]
      merge 5.6 => trunk

    modified:
      sql/share/CMakeLists.txt
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2012-07-19 11:02:46 +0000
+++ b/CMakeLists.txt	2012-09-05 08:29:51 +0000
@@ -470,3 +470,17 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
     PATTERN "sp-imp-spec.txt" EXCLUDE
   )
 ENDIF()
+
+# Re-distribute openssl: libeay32.dll and ssleay32.dll (and .lib)
+IF (WIN32 AND WITH_SSL_PATH)
+  GET_FILENAME_COMPONENT(CRYPTO_NAME "${CRYPTO_LIBRARY}" NAME_WE)
+  GET_FILENAME_COMPONENT(OPENSSL_NAME "${OPENSSL_LIBRARIES}" NAME_WE)
+  INSTALL(FILES "${CRYPTO_LIBRARY}"
+                "${OPENSSL_LIBRARIES}"
+          DESTINATION "${INSTALL_LIBDIR}"
+          COMPONENT Server)
+  INSTALL(FILES "${WITH_SSL_PATH}/bin/${CRYPTO_NAME}.dll"
+                 "${WITH_SSL_PATH}/bin/${OPENSSL_NAME}.dll"
+          DESTINATION "${INSTALL_BINDIR}"
+          COMPONENT Server)
+ENDIF()

=== modified file 'client/CMakeLists.txt'
--- a/client/CMakeLists.txt	2012-05-31 15:33:21 +0000
+++ b/client/CMakeLists.txt	2012-09-05 08:29:51 +0000
@@ -26,6 +26,11 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}
 )
 
+
+## We will need libeay32.dll and ssleay32.dll when running client executables.
+COPY_OPENSSL_DLLS(copy_openssl_client)
+
+
 ADD_DEFINITIONS(${READLINE_DEFINES})
 ADD_DEFINITIONS(${SSL_DEFINES})
 MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)

=== modified file 'cmake/ssl.cmake'
--- a/cmake/ssl.cmake	2012-08-23 09:18:04 +0000
+++ b/cmake/ssl.cmake	2012-09-05 08:29:51 +0000
@@ -175,3 +175,23 @@ MACRO (MYSQL_CHECK_SSL)
       "Wrong option for WITH_SSL. Valid values are : "${WITH_SSL_DOC})
   ENDIF()
 ENDMACRO()
+
+
+# Many executables will depend on libeay32.dll and ssleay32.dll at runtime.
+# In order to ensure we find the right version(s), we copy them into
+# the same directory as the executables.
+MACRO (COPY_OPENSSL_DLLS target_name)
+  IF (WIN32 AND WITH_SSL_PATH)
+    GET_FILENAME_COMPONENT(CRYPTO_NAME "${CRYPTO_LIBRARY}" NAME_WE)
+    GET_FILENAME_COMPONENT(OPENSSL_NAME "${OPENSSL_LIBRARIES}" NAME_WE)
+    ADD_CUSTOM_COMMAND(OUTPUT ${target_name}
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different
+          "${WITH_SSL_PATH}/bin/${CRYPTO_NAME}.dll"
+          "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${CRYPTO_NAME}.dll"
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different
+          "${WITH_SSL_PATH}/bin/${OPENSSL_NAME}.dll"
+          "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${OPENSSL_NAME}.dll"
+      )
+    ADD_CUSTOM_TARGET(${target_name} ALL)
+  ENDIF()
+ENDMACRO()

=== modified file 'extra/CMakeLists.txt'
--- a/extra/CMakeLists.txt	2012-06-09 13:16:21 +0000
+++ b/extra/CMakeLists.txt	2012-09-05 08:29:51 +0000
@@ -32,6 +32,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
  SET_TARGET_PROPERTIES(comp_err PROPERTIES LINKER_LANGUAGE CXX)
 ENDIF()
 
+
 ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h 
                    ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
                    COMMAND comp_err
@@ -51,6 +52,14 @@ ADD_CUSTOM_TARGET(GenError
                   ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys 
                   ${PROJECT_SOURCE_DIR}/sql/share/errmsg-utf8.txt)
 
+## Most executables depend on libeay32.dll (through mysys_ssl).
+## For 'comp_err' we need it to be available during build.
+COPY_OPENSSL_DLLS(copy_openssl_extra)
+IF (WIN32 AND WITH_SSL_PATH)
+  ADD_DEPENDENCIES(GenError copy_openssl_extra)
+ENDIF()
+
+
 MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
 TARGET_LINK_LIBRARIES(my_print_defaults  mysys mysys_ssl)
 SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)

=== modified file 'storage/perfschema/unittest/CMakeLists.txt'
--- a/storage/perfschema/unittest/CMakeLists.txt	2012-08-23 09:18:04 +0000
+++ b/storage/perfschema/unittest/CMakeLists.txt	2012-09-05 08:29:51 +0000
@@ -54,3 +54,6 @@ TARGET_LINK_LIBRARIES(pfs_connect_attr-t
   mysys mysys_ssl)
 TARGET_LINK_LIBRARIES(pfs_connect_attr-t vio ${SSL_LIBRARIES})
 ADD_TEST(pfs_connect_attr pfs_connect_attr-t)
+
+# On windows, pfs_connect_attr-t may depend on openssl dlls.
+COPY_OPENSSL_DLLS(copy_openssl_pfs_unittest)

=== modified file 'unittest/gunit/CMakeLists.txt'
--- a/unittest/gunit/CMakeLists.txt	2012-08-30 06:24:57 +0000
+++ b/unittest/gunit/CMakeLists.txt	2012-09-05 08:29:51 +0000
@@ -312,3 +312,6 @@ FOREACH(test ${SERVER_TESTS})
   ENDIF()
   ADD_TEST(${test} ${test}-t)
 ENDFOREACH()
+
+## Most executables depend on libeay32.dll (through mysys_ssl).
+COPY_OPENSSL_DLLS(copy_openssl_gunit)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:4429 to 4430) Tor Didriksen5 Sep