mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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".
This commit is contained in:
@ -24,7 +24,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tabl
|
||||
|
||||
# Build comp_sql - used for embedding SQL in C or C++ programs
|
||||
ADD_EXECUTABLE(comp_sql comp_sql.c)
|
||||
TARGET_LINK_LIBRARIES(comp_sql debug dbug mysys strings)
|
||||
TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings)
|
||||
|
||||
# Use comp_sql to build mysql_fix_privilege_tables_sql.c
|
||||
GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
|
||||
|
Reference in New Issue
Block a user