jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

CMake configuration needs some improvements

Open amirmasoudabdol opened this issue 4 years ago • 1 comments

Describe the bug

Here is a full description, https://github.com/cpm-cmake/CPM.cmake/issues/299.

To Reproduce

  1. Build the problem with a CMake
  2. 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?

amirmasoudabdol avatar Nov 25 '21 16:11 amirmasoudabdol

See #1374

Andres6936 avatar Dec 27 '21 15:12 Andres6936