diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index d0e383c6640..42125cffb7b 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -134,12 +134,6 @@ CACHE INTERNAL "Functions exported by client API" ) -IF(WIN32) - ADD_SUBDIRECTORY(authentication_win) - SET(WITH_AUTHENTICATION_WIN 1) - ADD_DEFINITIONS(-DAUTHENTICATION_WIN) -ENDIF(WIN32) - SET(CLIENT_SOURCES get_password.c libmysql.c @@ -157,9 +151,15 @@ ADD_DEPENDENCIES(clientlib GenError) SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL}) -IF(WITH_AUTHENTICATION_WIN) +# +# On Windows platform client library includes the client-side +# Windows Native Authentication plugin. +# +IF(WIN32) + ADD_DEFINITIONS(-DAUTHENTICATION_WIN) + ADD_SUBDIRECTORY(authentication_win) LIST(APPEND LIBS auth_win_client) -ENDIF(WITH_AUTHENTICATION_WIN) +ENDIF() # Merge several convenience libraries into one big mysqlclient # and link them together into shared library. diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index fb86d1ce60f..2e02e67c2c9 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -90,7 +90,14 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS} ${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${SSL_LIBRARIES}) - +# +# On Windows platform we compile in the clinet-side Windows Native Authentication +# plugin which is used by the client connection code included in the server. +# +IF(WIN32) + ADD_DEFINITIONS(-DAUTHENTICATION_WIN) + TARGET_LINK_LIBRARIES(sql auth_win_client) +ENDIF() IF(WIN32) SET(MYSQLD_SOURCE main.cc nt_servc.cc nt_servc.h message.rc)