Skip to content

Commit 517584d

Browse files
committed
Provide a way to reenable DISABLED plugin with -DPLUGIN_${NAME}=STATIC|DYNAMIC
1 parent a123264 commit 517584d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cmake/plugin.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ MACRO(MYSQL_ADD_PLUGIN)
7474
SET(compat "with${compat}")
7575
ENDIF()
7676

77-
IF (compat STREQUAL ".")
77+
IF (ARG_DISABLED)
78+
SET(howtobuild NO)
79+
ELSEIF (compat STREQUAL ".")
7880
SET(howtobuild DYNAMIC)
7981
ELSEIF (compat STREQUAL "with.")
8082
IF (NOT ARG_MODULE_ONLY)
@@ -122,7 +124,7 @@ MACRO(MYSQL_ADD_PLUGIN)
122124

123125
# Build either static library or module
124126
IF (PLUGIN_${plugin} MATCHES "(STATIC|AUTO|YES)" AND NOT ARG_MODULE_ONLY
125-
AND NOT ARG_DISABLED AND NOT ARG_CLIENT)
127+
AND NOT ARG_CLIENT)
126128

127129
IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
128130
# If there is a shared library from previous shared build,
@@ -178,8 +180,7 @@ MACRO(MYSQL_ADD_PLUGIN)
178180
SET (mysql_optional_plugins ${mysql_optional_plugins} PARENT_SCOPE)
179181
ENDIF()
180182
ELSEIF(PLUGIN_${plugin} MATCHES "(DYNAMIC|AUTO|YES)"
181-
AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS
182-
AND NOT ARG_DISABLED)
183+
AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)
183184

184185
ADD_VERSION_INFO(${target} MODULE SOURCES)
185186
ADD_LIBRARY(${target} MODULE ${SOURCES})

0 commit comments

Comments
 (0)