A CMake library jsoncpp-config.cmake file is very important for other CMake projects that use jsoncpp.
This allows other projects that use CMake to build against JsonCpp effectively
by adding
find_package( jsoncpp )
include_directories( ${jsoncpp_INCLUDE_DIRS} )
add_executable( myexe main.cpp )
target_link_libraries( myexe ${jsoncpp_LIBRARIES} )
to their CMakeLists.txt.
By only pointing their CMake build jsoncpp_DIR to their build of JsonCpp, it is
possible to easily and reliably build against an installed version of JsonCpp
or a non-installed version of JsonCpp.
This conforms to the recommended configuration as described here:
http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
This solution is more robust and easier to use that forcing other projects to use a FindJsonCpp.cmake file.
Two patches are provided, one that changes the CMake commands to modern CMake style of lower case command names, and one that adds the jsoncpp-config.cmake file generation.
Moved to: https://github.com/open-source-parsers/jsoncpp/issues/180