Commit c20979b1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-9601 Build client plugins, also for the cmake client-only build

(-DWITHOUT_SERVER=1)
parent d9c640aa
...@@ -366,11 +366,9 @@ IF(WITH_UNIT_TESTS) ...@@ -366,11 +366,9 @@ IF(WITH_UNIT_TESTS)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(NOT WITHOUT_SERVER) SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") # Add storage engines and plugins.
# Add storage engines and plugins. CONFIGURE_PLUGINS()
CONFIGURE_PLUGINS()
ENDIF()
ADD_SUBDIRECTORY(include) ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(dbug) ADD_SUBDIRECTORY(dbug)
...@@ -400,6 +398,10 @@ IF(NOT WITHOUT_SERVER) ...@@ -400,6 +398,10 @@ IF(NOT WITHOUT_SERVER)
ADD_SUBDIRECTORY(mysql-test) ADD_SUBDIRECTORY(mysql-test)
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
ADD_SUBDIRECTORY(sql-bench) ADD_SUBDIRECTORY(sql-bench)
IF(WIN32)
ADD_SUBDIRECTORY(win/upgrade_wizard)
ADD_SUBDIRECTORY(win/packaging)
ENDIF()
ENDIF() ENDIF()
IF(UNIX) IF(UNIX)
...@@ -409,10 +411,7 @@ ENDIF() ...@@ -409,10 +411,7 @@ ENDIF()
INCLUDE(cmake/abi_check.cmake) INCLUDE(cmake/abi_check.cmake)
INCLUDE(cmake/tags.cmake) INCLUDE(cmake/tags.cmake)
IF(WIN32)
ADD_SUBDIRECTORY(win/upgrade_wizard)
ADD_SUBDIRECTORY(win/packaging)
ENDIF()
INCLUDE(for_clients) INCLUDE(for_clients)
......
...@@ -28,12 +28,15 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake) ...@@ -28,12 +28,15 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake)
# [LINK_LIBRARIES lib1...libN] # [LINK_LIBRARIES lib1...libN]
# [DEPENDENCIES target1...targetN] # [DEPENDENCIES target1...targetN]
MACRO(MYSQL_ADD_PLUGIN) FUNCTION(MYSQL_ADD_PLUGIN)
MYSQL_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"LINK_LIBRARIES;DEPENDENCIES;MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG" "LINK_LIBRARIES;DEPENDENCIES;MODULE_OUTPUT_NAME;STATIC_OUTPUT_NAME;COMPONENT;CONFIG"
"STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED;CLIENT" "STORAGE_ENGINE;STATIC_ONLY;MODULE_ONLY;MANDATORY;DEFAULT;DISABLED;RECOMPILE_FOR_EMBEDDED;CLIENT"
${ARGN} ${ARGN}
) )
IF(WITHOUT_SERVER AND NOT ARG_CLIENT)
RETURN()
ENDIF()
# Add common include directories # Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
...@@ -235,14 +238,16 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -235,14 +238,16 @@ MACRO(MYSQL_ADD_PLUGIN)
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mysql-test") IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mysql-test")
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}") INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}")
ENDIF() ENDIF()
ENDFUNCTION()
ENDMACRO()
# Add all CMake projects under storage and plugin # Add all CMake projects under storage and plugin
# subdirectories, configure sql_builtins.cc # subdirectories, configure sql_builtins.cc
MACRO(CONFIGURE_PLUGINS) MACRO(CONFIGURE_PLUGINS)
IF(NOT WITHOUT_SERVER)
FILE(GLOB dirs_storage ${CMAKE_SOURCE_DIR}/storage/*) FILE(GLOB dirs_storage ${CMAKE_SOURCE_DIR}/storage/*)
ENDIF()
FILE(GLOB dirs_plugin ${CMAKE_SOURCE_DIR}/plugin/*) FILE(GLOB dirs_plugin ${CMAKE_SOURCE_DIR}/plugin/*)
FOREACH(dir ${dirs_storage} ${dirs_plugin}) FOREACH(dir ${dirs_storage} ${dirs_plugin})
IF (EXISTS ${dir}/CMakeLists.txt) IF (EXISTS ${dir}/CMakeLists.txt)
......
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