Commit 9e655bff authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Bug #43715 Link errors when trying to link mysql_embedded.exe

The reason for the error is incorrectly specified link dependencies
for mysql_embedded, mysqltest_embedded and mysql_client_test_embedded
in CMakeLists.txt (ADD_DEPENDENCIES should be TARGET_LINK_LIBRARIES)


libmysqld/CMakeLists.txt:
  changed library type for libmysqld to SHARED instead of
  MODULE. MODULE in CMake notation is a shared library that 
  is used only in dlopen/dlsym/LoadLibrary scenarios.
  Hence it was impossible to use TARGET_LINK_LIBRARIES with
  a MODULE.
libmysqld/examples/CMakeLists.txt:
  Use TARGET_LINK_LIBRARIES (instead of previously incorrectly 
  used ADD_DEPENDENCIES) to specify link dependency from libmysqld
parent b7ce2a25
......@@ -201,6 +201,6 @@ ADD_LIBRARY(mysqlserver STATIC ${LIBMYSQLD_SOURCES})
ADD_DEPENDENCIES(mysqlserver GenServerSource GenError)
TARGET_LINK_LIBRARIES(mysqlserver)
ADD_LIBRARY(libmysqld MODULE cmake_dummy.c libmysqld.def)
ADD_LIBRARY(libmysqld SHARED cmake_dummy.c libmysqld.def)
ADD_DEPENDENCIES(libmysqld mysqlserver)
TARGET_LINK_LIBRARIES(libmysqld mysqlserver wsock32)
......@@ -30,12 +30,12 @@ ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc
../../client/sql_string.cc)
TARGET_LINK_LIBRARIES(mysql_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysql_embedded libmysqld)
TARGET_LINK_LIBRARIES(mysql_embedded libmysqld)
ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc)
TARGET_LINK_LIBRARIES(mysqltest_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
TARGET_LINK_LIBRARIES(mysqltest_embedded libmysqld)
ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)
TARGET_LINK_LIBRARIES(mysql_client_test_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
ADD_DEPENDENCIES(mysql_client_test_embedded libmysqld)
TARGET_LINK_LIBRARIES(mysql_client_test_embedded libmysqld)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment