1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

MDEV-33513 On Windows, build auth_gssapi_client statically and dynamically.

With normal client, statically linked plugin with be used
The DLL is for the obscure in-server client, which we never got rid off.

That client is used with mariabackup, replication, and some storage engines,
e.g connect and federated.
This commit is contained in:
Vladislav Vaintroub
2024-03-12 13:18:47 +01:00
parent a66d371835
commit 1437ff0470
2 changed files with 8 additions and 6 deletions

View File

@@ -46,9 +46,10 @@ FUNCTION(REGISTER_PLUGIN)
if(NOT ${CC_PLUGIN_DEFAULT} STREQUAL "OFF")
set(PLUGIN_${CC_PLUGIN_TARGET}_TYPE ${CC_PLUGIN_TYPE})
if(${CC_PLUGIN_DEFAULT} STREQUAL "DYNAMIC")
if(${CC_PLUGIN_DEFAULT} MATCHES "DYNAMIC")
set(PLUGINS_DYNAMIC ${PLUGINS_DYNAMIC} ${CC_PLUGIN_TARGET} PARENT_SCOPE)
add_library(${CC_PLUGIN_TARGET} MODULE ${CC_PLUGIN_SOURCES})
if(WIN32)
set(target ${CC_PLUGIN_TARGET})
set(FILE_TYPE "VFT_DLL")
@@ -58,9 +59,9 @@ FUNCTION(REGISTER_PLUGIN)
configure_file(${CC_SOURCE_DIR}/win/resource.rc.in
${CC_BINARY_DIR}/win/${target}.rc
@ONLY)
set(CC_PLUGIN_SOURCES ${CC_PLUGIN_SOURCES} ${CC_BINARY_DIR}/win/${target}.rc ${CC_SOURCE_DIR}/plugins/plugin.def)
target_sources(${CC_PLUGIN_TARGET} PRIVATE
${CC_BINARY_DIR}/win/${target}.rc ${CC_SOURCE_DIR}/plugins/plugin.def)
endif()
add_library(${CC_PLUGIN_TARGET} MODULE ${CC_PLUGIN_SOURCES})
target_link_libraries(${CC_PLUGIN_TARGET} ${CC_PLUGIN_LIBRARIES})
set_target_properties(${CC_PLUGIN_TARGET} PROPERTIES PREFIX "")
set_target_properties(${CC_PLUGIN_TARGET}
@@ -81,7 +82,8 @@ FUNCTION(REGISTER_PLUGIN)
SIGN_TARGET(${target})
endif()
INSTALL_PLUGIN(${CC_PLUGIN_TARGET} ${CMAKE_CURRENT_BINARY_DIR})
elseif(${CC_PLUGIN_DEFAULT} STREQUAL "STATIC")
endif()
if(${CC_PLUGIN_DEFAULT} MATCHES "STATIC")
set(PLUGINS_STATIC ${PLUGINS_STATIC} ${CC_PLUGIN_TARGET} PARENT_SCOPE)
set(LIBMARIADB_PLUGIN_CFLAGS ${LIBMARIADB_PLUGIN_CFLAGS} ${CC_PLUGIN_COMPILE_OPTIONS} PARENT_SCOPE)
set(LIBMARIADB_PLUGIN_INCLUDES ${LIBMARIADB_PLUGIN_INCLUDES} ${CC_PLUGIN_INCLUDES} PARENT_SCOPE)