CMake configuration needs some improvements
Describe the bug
Here is a full description, https://github.com/cpm-cmake/CPM.cmake/issues/299.
To Reproduce
- Build the problem with a CMake
- CMake build and install the project at the same time.
Expected behavior
In modern CMake, build and install targets are not the same, and by mixing them into one step, you are causing issues for other projects that wants to include the jsoncpp as dependency to their projects. Because jsoncpp initiate the install stage, all other projects will get confused and initiate their install stages into the GNU paths, and that should not happen unless intentionally. I was expecting that this flag, JSONCPP_WITH_CMAKE_PACKAGE would allow me to separate this but it doesn't.
Desktop (please complete the following information):
- OS: macOS Monterey 12.0
- CMake version, 3.21
Additional context
It is ok that this is a default behaviour but maybe there should be an option to disable it?
See #1374