Skip to content

MDEV-40608 MariaDB-devel is incomplete for plugins - #5486

Draft
vuvova wants to merge 1 commit into
11.4from
bb-11.4-MDEV-40608
Draft

MDEV-40608 MariaDB-devel is incomplete for plugins#5486
vuvova wants to merge 1 commit into
11.4from
bb-11.4-MDEV-40608

Conversation

@vuvova

@vuvova vuvova commented Aug 4, 2026

Copy link
Copy Markdown
Member

create and install mariadb-plugin-config.cmake

create and install mariadb-plugin-config.cmake
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vuvova
vuvova marked this pull request as draft August 4, 2026 15:12
@vuvova

vuvova commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

@vaintroub FYI, it's a draft, I'm not proposing it for a merge yet. But see the direction.
With that a plugin needs find_project(mariadb-plugin REQUIRED) and MARIADB_ADD_PLUGIN() to be buildable with cmake . && make, no server sources required.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an installable CMake config intended to make the MariaDB development package usable for building plugins, and refactors plugin CMake plumbing to support that packaging.

Changes:

  • Introduces support-files/mariadb-plugin-config.cmake.in and installs the configured result into ${INSTALL_SHAREDIR}/cmake/mariadb-plugin/.
  • Refactors plugin discovery to live in the top-level CMakeLists.txt and introduces VERIFY_PLUGINS() in cmake/plugin.cmake.
  • Renames the primary plugin macro to MARIADB_ADD_PLUGIN while keeping MYSQL_ADD_PLUGIN as a compatibility wrapper.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
support-files/mariadb-plugin-config.cmake.in New installed CMake config template intended for plugin consumers.
support-files/CMakeLists.txt Generates/installs the new plugin config CMake file.
CMakeLists.txt Moves plugin subdirectory enumeration into the top-level build and calls VERIFY_PLUGINS().
cmake/plugin.cmake Introduces MARIADB_ADD_PLUGIN, keeps MYSQL_ADD_PLUGIN wrapper, and adds VERIFY_PLUGINS().
.gitignore Ignores the generated support-files/mariadb-plugin-config.cmake.

Comment thread support-files/mariadb-plugin-config.cmake.in
Comment on lines +16 to +23
MACRO(DTRACE_INSTRUMENT)
ENDMACRO()
MACRO(ADD_VERSION_INFO)
ENDMACRO()
MACRO(MYSQL_INSTALL_TARGETS)
INSTALL(TARGETS ${ARGV})
ENDMACRO()
ADD_CUSTOM_TARGET(GenError)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not so easy. I need to try it on a plugin with tests

Comment thread support-files/CMakeLists.txt
Comment thread CMakeLists.txt
@vaintroub

Copy link
Copy Markdown
Member

@vaintroub FYI, it's a draft, I'm not proposing it for a merge yet. But see the direction. With that a plugin needs find_project(mariadb-plugin REQUIRED) and MARIADB_ADD_PLUGIN() to be buildable with cmake . && make, no server sources required.

you mean "find_package(mariadb-plugin CONFIG REQUIRED)" . Yes, I thought about something like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants