diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-30 03:39:37 +0200 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-09-30 03:39:37 +0200 |
commit | 46d04ebdefe05377b86e851d73df22c069d63246 (patch) | |
tree | abeea5fd6b9b99995ec6b277906b6ddbacc5752a /sql/CMakeLists.txt | |
parent | e6090f10bb581e8f16f8ecb676a27e184548ef24 (diff) | |
download | mariadb-git-46d04ebdefe05377b86e851d73df22c069d63246.tar.gz |
Backport of the patch
http://lists.mysql.com/commits/57725
Vladislav Vaintroub 2008-11-03
Cleanup CMakeLists.txt(s) - remove winsock2 (ws2_32) from
TARGET_LINK_LIBRARIES.
Every exe or dll linked with mysys needs ws2_32, because
mysys uses winsock function WSAStartup in my_init().
However, there is no need to explicitely add ws2_32 to
the list of TARGET_LINK_LIBRARIES multiple times.
Visual Studio comes with a handy pragma that tells linker
to add library. So patch replaces bunch of ws2_32 in
CMakeLists with single pragma comment(lib,"ws2_32")
in my_init.c
Additionally, reference to non-existing "debug" library
has been removed from TARGET_LINK_LIBRARIES. The correct
name of the library is "dbug".
Diffstat (limited to 'sql/CMakeLists.txt')
-rwxr-xr-x | sql/CMakeLists.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 592092ba7aa..1b7175a7b82 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -96,7 +96,6 @@ SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE) SET (MYSQLD_CORE_LIBS mysys zlib dbug strings yassl taocrypt vio regex sql) TARGET_LINK_LIBRARIES(mysqld ${MYSQLD_CORE_LIBS} ${MYSQLD_STATIC_ENGINE_LIBS}) -TARGET_LINK_LIBRARIES(mysqld ws2_32.lib) IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS) @@ -129,7 +128,7 @@ ADD_CUSTOM_COMMAND( # Gen_lex_hash ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) -TARGET_LINK_LIBRARIES(gen_lex_hash debug dbug mysqlclient wsock32) +TARGET_LINK_LIBRARIES(gen_lex_hash dbug mysqlclient) GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${PROJECT_SOURCE_DIR}/sql/lex_hash.h @@ -152,4 +151,4 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) ADD_DEPENDENCIES(udf_example strings GenError) -TARGET_LINK_LIBRARIES(udf_example strings wsock32) +TARGET_LINK_LIBRARIES(udf_example strings) |