Skip to content

Commit

Permalink
Provide a way to reenable DISABLED plugin with -DPLUGIN_${NAME}=STATI…
Browse files Browse the repository at this point in the history
…C|DYNAMIC
  • Loading branch information
vaintroub committed Mar 13, 2016
1 parent a123264 commit 517584d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmake/plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(compat "with${compat}")
ENDIF()

IF (compat STREQUAL ".")
IF (ARG_DISABLED)
SET(howtobuild NO)
ELSEIF (compat STREQUAL ".")
SET(howtobuild DYNAMIC)
ELSEIF (compat STREQUAL "with.")
IF (NOT ARG_MODULE_ONLY)
Expand Down Expand Up @@ -122,7 +124,7 @@ MACRO(MYSQL_ADD_PLUGIN)

# Build either static library or module
IF (PLUGIN_${plugin} MATCHES "(STATIC|AUTO|YES)" AND NOT ARG_MODULE_ONLY
AND NOT ARG_DISABLED AND NOT ARG_CLIENT)
AND NOT ARG_CLIENT)

IF(CMAKE_GENERATOR MATCHES "Makefiles|Ninja")
# If there is a shared library from previous shared build,
Expand Down Expand Up @@ -178,8 +180,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET (mysql_optional_plugins ${mysql_optional_plugins} PARENT_SCOPE)
ENDIF()
ELSEIF(PLUGIN_${plugin} MATCHES "(DYNAMIC|AUTO|YES)"
AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS
AND NOT ARG_DISABLED)
AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)

ADD_VERSION_INFO(${target} MODULE SOURCES)
ADD_LIBRARY(${target} MODULE ${SOURCES})
Expand Down

0 comments on commit 517584d

Please sign in to comment.