Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation via Meson #1345

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

mpoquet
Copy link
Contributor

@mpoquet mpoquet commented Nov 7, 2018

Hello and thanks for your work!

This commit allows to install the library via meson.

  • The single_include header file is installed into lib/include/nlohmann/json.hpp.
  • A pkg-config file nlohmann_json.pc is generated into the default directory lib/pkgconfig.

Usage example

meson build # [--prefix=/desired/installation/path]
cd build
ninja install

Example of generated nlohmann_json.pc

prefix=/usr/local
libdir=${prefix}/lib
includedir=${prefix}/include

Name: nlohmann_json
Description: JSON for Modern C++
Version: 3.4.0
Cflags: -I${includedir}

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ffe0898 on mpoquet:feature/meson-install-pkgconfig into d2e6e1b on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann self-assigned this Nov 8, 2018
@nlohmann nlohmann added this to the Release 3.4.1 milestone Nov 8, 2018
@nlohmann nlohmann merged commit f86090a into nlohmann:develop Nov 8, 2018
@nlohmann
Copy link
Owner

nlohmann commented Nov 8, 2018

Thanks!

@elvisoric
Copy link

Hello there.
Meson build script should be changed to allow installation only if the library is not used as subproject. I added issue #1463 and pull request regarding the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants