summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-09-30 03:39:37 +0200
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-09-30 03:39:37 +0200
commitb73763e0f913a1b3e841cbe91f9d11802cbf054c (patch)
treeabeea5fd6b9b99995ec6b277906b6ddbacc5752a /extra
parent2bc1930c6c40b964fce9c698a1ca75da3138ad63 (diff)
downloadmariadb-git-b73763e0f913a1b3e841cbe91f9d11802cbf054c.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 'extra')
-rwxr-xr-xextra/CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index cec0db6a4ae..0d09e676af1 100755
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -20,7 +20,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(comp_err comp_err.c)
-TARGET_LINK_LIBRARIES(comp_err debug dbug mysys strings zlib wsock32)
+TARGET_LINK_LIBRARIES(comp_err dbug mysys strings zlib)
GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
@@ -39,16 +39,16 @@ ADD_CUSTOM_TARGET(GenError
DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h)
ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
-TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock32)
+TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt)
ADD_EXECUTABLE(perror perror.c)
-TARGET_LINK_LIBRARIES(perror strings mysys debug dbug wsock32)
+TARGET_LINK_LIBRARIES(perror strings mysys dbug)
ADD_EXECUTABLE(resolveip resolveip.c)
-TARGET_LINK_LIBRARIES(resolveip strings mysys debug dbug wsock32)
+TARGET_LINK_LIBRARIES(resolveip strings mysys dbug)
ADD_EXECUTABLE(replace replace.c)
-TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32)
+TARGET_LINK_LIBRARIES(replace strings mysys dbug)
IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myTest" "asInvoker")