Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36366

cmake(libfmt): use find_package to find libfmt

Details

    Description

      This patch improves libfmt detection by calling find_package(fmt QUIET) first when WITH_LIBFMT is set to system or auto. If a system libfmt is located successfully, we skip the custom source-compile snippet. Otherwise, we proceed with the old detection logic (compile test) and finally fall back to the bundled library if needed. This change makes it easier for package managers (e.g., Homebrew) or system environments that already have a modern fmt installed to integrate with MariaDB, without having to override CMake variables manually.

      Before this patch, the logic always set CMAKE_REQUIRED_INCLUDES to the bundled copy’s include directory and ran a snippet test, failing if the user had removed or disabled the bundled directory. Now, if a system installation is discoverable via CMake config files, MariaDB can be built cleanly against that library.

      Pull request: https://github.com/MariaDB/server/pull/3786

      Attachments

        Activity

          svoj Sergey Vojtovich created issue -
          svoj Sergey Vojtovich made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10101 ]
          svoj Sergey Vojtovich made changes -
          Assignee Sergey Vojtovich [ svoj ] Sergei Golubchik [ serg ]
          Status Confirmed [ 10101 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 12.0 [ 29945 ]

          People

            serg Sergei Golubchik
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.