diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-08-03 09:50:22 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-08-03 10:10:00 +0200 |
commit | 175c9fe1d57daae2cf5fbc514cfffc27a55afcb0 (patch) | |
tree | ae40465dd34de3b5ee36b6fb78bfb19e73df6415 /cmake | |
parent | b549af69137023ce0f93d312a10d61e467dca07f (diff) | |
download | mariadb-git-175c9fe1d57daae2cf5fbc514cfffc27a55afcb0.tar.gz |
cleanup: specifying plugin dependencies in CMakeLists.txt
1. rename option DEPENDENCIES in MYSQL_ADD_PLUGIN() to DEPENDS
to be consistent with other cmake commands and macros
2. use this DEPENDS option in plugins
3. add dependencies to the plugin embedded target too
4. plugins don't need to add GenError dependency explicitly,
all plugins depend on it automatically
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/plugin.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index 7a8eb97891e..4184dc46648 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -26,13 +26,13 @@ INCLUDE(CMakeParseArguments) # [STATIC_OUTPUT_NAME static_name] # [RECOMPILE_FOR_EMBEDDED] # [LINK_LIBRARIES lib1...libN] -# [DEPENDENCIES target1...targetN] +# [DEPENDS target1...targetN] MACRO(MYSQL_ADD_PLUGIN) CMAKE_PARSE_ARGUMENTS(ARG "STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED;CLIENT" "MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG" - "LINK_LIBRARIES;DEPENDENCIES" + "LINK_LIBRARIES;DEPENDS" ${ARGN} ) IF(NOT WITHOUT_SERVER OR ARG_CLIENT) @@ -111,8 +111,8 @@ MACRO(MYSQL_ADD_PLUGIN) ENDIF() UNSET(${with_var} CACHE) - IF(NOT ARG_DEPENDENCIES) - SET(ARG_DEPENDENCIES) + IF(NOT ARG_DEPENDS) + SET(ARG_DEPENDS) ENDIF() IF(NOT ARG_MODULE_OUTPUT_NAME) @@ -138,7 +138,7 @@ MACRO(MYSQL_ADD_PLUGIN) ADD_LIBRARY(${target} STATIC ${SOURCES}) DTRACE_INSTRUMENT(${target}) - ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES}) + ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDS}) RESTRICT_SYMBOL_EXPORTS(${target}) IF(WITH_EMBEDDED_SERVER) # Embedded library should contain PIC code and be linkable @@ -152,7 +152,7 @@ MACRO(MYSQL_ADD_PLUGIN) SET_TARGET_PROPERTIES(${target}_embedded PROPERTIES COMPILE_DEFINITIONS "EMBEDDED_LIBRARY") ENDIF() - ADD_DEPENDENCIES(${target}_embedded GenError) + ADD_DEPENDENCIES(${target}_embedded GenError ${ARG_DEPENDS}) ENDIF() ENDIF() @@ -213,7 +213,7 @@ MACRO(MYSQL_ADD_PLUGIN) TARGET_LINK_LIBRARIES (${target} "-Wl,--no-undefined") ENDIF() - ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDENCIES}) + ADD_DEPENDENCIES(${target} GenError ${ARG_DEPENDS}) SET_TARGET_PROPERTIES(${target} PROPERTIES OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}") |