|
| 1 | +-- Form B inline descriptor for {fmt} — a modern formatting library for C++. |
| 2 | +-- C++-source compat build (same shape as compat.gtest): compile the library's |
| 3 | +-- non-header translation units into a lib and expose the `include/` tree via |
| 4 | +-- include_dirs, so consumers write `#include <fmt/core.h>` / `<fmt/format.h>`. |
| 5 | +-- |
| 6 | +-- Sources: fmt's compiled implementation is `src/format.cc` (core formatting) |
| 7 | +-- and `src/os.cc` (optional OS-specific I/O — fmt::ostream, file descriptors). |
| 8 | +-- These two are exactly upstream CMake's `fmt` target sources. NOT globbed: |
| 9 | +-- * `src/fmt.cc` — the C++20 named-module unit (starts with `module;`); it |
| 10 | +-- must be compiled as a module interface, not a plain TU, |
| 11 | +-- so it is deliberately excluded here. |
| 12 | +-- * `src/fmt-c.cc` — the optional C API; gated behind the `c-api` feature |
| 13 | +-- below (excluded by default, same pattern as compat.gtest |
| 14 | +-- gating gtest_main behind `main`). |
| 15 | +-- |
| 16 | +-- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/` absorbs |
| 17 | +-- the GitHub tarball's `fmt-<tag>/` wrap layer. |
| 18 | +package = { |
| 19 | + spec = "1", |
| 20 | + namespace = "compat", |
| 21 | + name = "compat.fmt", |
| 22 | + description = "A modern formatting library for C++", |
| 23 | + licenses = {"MIT"}, |
| 24 | + repo = "https://github.com/fmtlib/fmt", |
| 25 | + type = "package", |
| 26 | + |
| 27 | + xpm = { |
| 28 | + linux = { |
| 29 | + ["12.2.0"] = { |
| 30 | + url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.2.0.tar.gz", |
| 31 | + sha256 = "8b852bb5aa6e7d8564f9e81394055395dd1d1936d38dfd3a17792a02bebd7af0", |
| 32 | + }, |
| 33 | + }, |
| 34 | + macosx = { |
| 35 | + ["12.2.0"] = { |
| 36 | + url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.2.0.tar.gz", |
| 37 | + sha256 = "8b852bb5aa6e7d8564f9e81394055395dd1d1936d38dfd3a17792a02bebd7af0", |
| 38 | + }, |
| 39 | + }, |
| 40 | + windows = { |
| 41 | + ["12.2.0"] = { |
| 42 | + url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.2.0.tar.gz", |
| 43 | + sha256 = "8b852bb5aa6e7d8564f9e81394055395dd1d1936d38dfd3a17792a02bebd7af0", |
| 44 | + }, |
| 45 | + }, |
| 46 | + }, |
| 47 | + |
| 48 | + mcpp = { |
| 49 | + language = "c++23", |
| 50 | + import_std = false, |
| 51 | + include_dirs = { "*/include" }, |
| 52 | + sources = { "*/src/format.cc", "*/src/os.cc" }, |
| 53 | + targets = { ["fmt"] = { kind = "lib" } }, |
| 54 | + -- Optional C API (src/fmt-c.cc, <fmt/fmt-c.h>), source-gated like |
| 55 | + -- compat.gtest's `main` / compat.cjson's `utils`. NOTE: mcpp 0.0.81 does |
| 56 | + -- not yet propagate a feature requested on a DEPENDENCY into its compile |
| 57 | + -- plan, so this object is not built and fmt_vformat is unresolved even |
| 58 | + -- with the feature on — the same gap compat.eigen notes for `eigen_blas`. |
| 59 | + -- Kept form-correct; lights up once mcpp propagates dependency features. |
| 60 | + features = { |
| 61 | + ["c-api"] = { sources = { "*/src/fmt-c.cc" } }, |
| 62 | + }, |
| 63 | + deps = { }, |
| 64 | + }, |
| 65 | +} |
0 commit comments