Commit f725020f authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix cmake warning caused by 751ebe44

CMake Warning (dev) at cmake/plugin.cmake:288 (GET_TARGET_PROPERTY):
  Policy CMP0045 is not set: Error on non-existent target...

Also, fix condition argument in ADD_FEATURE_INFO. It is not a string
but boolean
parent 160d97a4
...@@ -257,15 +257,20 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -257,15 +257,20 @@ MACRO(MYSQL_ADD_PLUGIN)
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}") INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}")
ENDIF() ENDIF()
IF(TARGET ${target})
GET_TARGET_PROPERTY(plugin_type ${target} TYPE) GET_TARGET_PROPERTY(plugin_type ${target} TYPE)
STRING(REGEX REPLACE "_LIBRARY$" "" plugin_type ${plugin_type}) STRING(REPLACE "_LIBRARY" "" plugin_type ${plugin_type})
STRING(REGEX REPLACE "^NO$" "" plugin_type ${plugin_type}) SET(have_target 1)
ELSE()
SET(plugin_type)
SET(have_target 0)
ENDIF()
IF(ARG_STORAGE_ENGINE) 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) ELSEIF(ARG_CLIENT)
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Client plugin ${plugin_type}") ADD_FEATURE_INFO(${plugin} ${have_target} "Client plugin ${plugin_type}")
ELSE() ELSE()
ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Server plugin ${plugin_type}") ADD_FEATURE_INFO(${plugin} ${have_target} "Server plugin ${plugin_type}")
ENDIF() ENDIF()
ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT) ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT)
ENDMACRO() ENDMACRO()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment