Use a consistent target name for jsoncpp in CMake scripts #333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Rebased from #325.)
The target name for the jsoncpp library would change based on whether
we were building a static or shared library. This inconsistency made
it difficult and unintuitive to pull in jsoncpp as a submodule in
another repository and link to it directly via other CMake scripts.
Having a consistent target name will allow libraries with their own
CMake scripts to reliably refer to jsoncpp as a dependency.
Other Changes:
BUILD_SHARED_LIBS
andBUILD_STATIC_LIBS
removed in favor ofJSONCPP_LIBRARY_TYPE
, which allows you to pick eitherSHARED
or
STATIC
library variations. This change was made to preventboth shared and static libraries being built at the same time.
This isn't allowed anymore since we only generate 1 target for the
jsoncpp library now.
travis.sh
build script updated to perform CMake generation in anout-of-source binary directory. This will prevent the temporary
generated output files from intermixing into the source tree and
allow for multiple generations with different configurations using
the same source tree.