diff options
Diffstat (limited to 'cmake/plugin.cmake')
-rw-r--r-- | cmake/plugin.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 4184dc46648..8b050a808ab 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -257,15 +257,20 @@ MACRO(MYSQL_ADD_PLUGIN) INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}") ENDIF() - GET_TARGET_PROPERTY(plugin_type ${target} TYPE) - STRING(REGEX REPLACE "_LIBRARY$" "" plugin_type ${plugin_type}) - STRING(REGEX REPLACE "^NO$" "" plugin_type ${plugin_type}) + IF(TARGET ${target}) + GET_TARGET_PROPERTY(plugin_type ${target} TYPE) + STRING(REPLACE "_LIBRARY" "" plugin_type ${plugin_type}) + SET(have_target 1) + ELSE() + SET(plugin_type) + SET(have_target 0) + ENDIF() IF(ARG_STORAGE_ENGINE) - ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Storage Engine ${plugin_type}") + ADD_FEATURE_INFO(${plugin} ${have_target} "Storage Engine ${plugin_type}") ELSEIF(ARG_CLIENT) - ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Client plugin ${plugin_type}") + ADD_FEATURE_INFO(${plugin} ${have_target} "Client plugin ${plugin_type}") ELSE() - ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Server plugin ${plugin_type}") + ADD_FEATURE_INFO(${plugin} ${have_target} "Server plugin ${plugin_type}") ENDIF() ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT) ENDMACRO() |