Specify minimum fmt version

SOCI uses `fmt::underlying` which seems to have been introduced via 0b2862a1e4 and the oldest tag containing this commit is `9.1.0`.

Without this SOCI will fail to build on Ubuntu 22.04 with `libfmt-dev` installed from the repositories (which is version 8.1) with this error message:
src/core/statement.cpp:815:35: error: ‘underlying’ is not a member of ‘fmt’
  815 |                              fmt::underlying(dbtype)));
      |                                   ^~~~~~~~~~
This commit is contained in:
Robert Adam
2026-08-29 20:10:40 +02:00
committed by VZ
parent e5ff44cc21
commit 5882eaeea5

View File

@@ -125,7 +125,7 @@ if(TARGET fmt::fmt)
message(STATUS "Using already existing fmt target")
set(soci_use_bundled_fmt OFF)
elseif(NOT SOCI_FMT_BUILTIN)
find_package(fmt QUIET)
find_package(fmt 9.1 QUIET)
if (fmt_FOUND)
message(STATUS "Using system fmt library ${fmt_VERSION}")
set(soci_use_bundled_fmt OFF)