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

Implement additional integration options #238

Merged
merged 4 commits into from
Apr 26, 2016

Conversation

robertmrk
Copy link
Contributor

This PR contains the implementation of the changes suggested in #237.
The listfile is quite different then it was. The required c++ standard is now specified as a target property for the json_unit executable which is more portable, and compiler flags and definitions are also specified using target properties using generator expressions instead of variables, but they result in the same compiler flags.
The only longterm change that this PR brings is that from now on the version number of the library must be changed in the listfile as well when a new release is published so CMake can generate the appropriate config version file for the package when it's installed.

Define the library as an interface imported library so other targets
can use the library as a dependency and use the interface properties
of the library.
- define the project's version in the cmake listfile
- create a config and config version file for the cmake package
- install the json.hpp file and the package's targets, config and
config version files
Generate the config files of the package in CMAKE_CURRENT_BINARY_DIR
instead of CMAKE_BINARY_DIR because the later will refer to the main
project's binary directory if the library is included in the project
using the add_subdirectory command.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.799% when pulling 192a692 on robertmrk:cmake-package into 3ca1bfd on nlohmann:develop.

@nlohmann nlohmann merged commit 0f64761 into nlohmann:develop Apr 26, 2016
@nlohmann
Copy link
Owner

Thanks!

This closes #237.

nlohmann added a commit that referenced this pull request Apr 26, 2016
@robertmrk robertmrk deleted the cmake-package branch May 19, 2016 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants