mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 21:20:30 +00:00
Document the Meson options and check them in CI
Describe the options of meson.build in FILES.md and in the Meson section of the package manager documentation, which so far said that a Meson installation always uses the default configuration. The ci_meson_install job now also installs with non-default options and checks that the headers of the multi-header version are installed, that the definitions reach the pkg-config file and the CMake target, and that find_package still works. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -277,9 +277,12 @@ meson setup builddir
|
||||
ninja -C builddir
|
||||
```
|
||||
|
||||
The build definition for the [Meson](https://mesonbuild.com) build system. When installing, it also installs the CMake package config
|
||||
files so that `find_package(nlohmann_json)` works. As Meson cannot generate `nlohmann_jsonTargets.cmake` itself, it is
|
||||
created from the template `cmake/nlohmann_jsonTargets.cmake.in`, which is only used by Meson.
|
||||
`meson_options.txt` defines the options, which mirror the CMake options that change the library's target (for example,
|
||||
`-DDiagnostics=true`). Meson requires this file next to `meson.build`, so it is also part of `include.zip`.
|
||||
|
||||
When installing, `meson.build` installs the headers, a pkg-config file, and the CMake package config files, so that
|
||||
`find_package(nlohmann_json)` works. As Meson cannot generate `nlohmann_jsonTargets.cmake` itself, it is created from
|
||||
the template `cmake/nlohmann_jsonTargets.cmake.in`, which is only used by Meson.
|
||||
|
||||
### `Package.swift`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user