mirror of
https://github.com/nlohmann/json.git
synced 2026-10-05 22:20:30 +00:00
Install CMake package config files with Meson
A Meson installation only provided the headers and a pkg-config file, so consumers using find_package(nlohmann_json) could not find the library. Meson now also installs nlohmann_jsonConfig.cmake and nlohmann_jsonConfigVersion.cmake from the existing templates, plus a static nlohmann_jsonTargets.cmake that defines the header-only imported target with a relocatable include path. A new CI job installs with Meson and builds tests/cmake_import/project against the result. Closes #3885 Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -262,7 +262,9 @@ The "Check amalgamation" workflow fails if the file is out of date.
|
||||
|
||||
### `meson.build`
|
||||
|
||||
The build definition for the [Meson](https://mesonbuild.com) build system.
|
||||
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.
|
||||
|
||||
### `Package.swift`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user