open-source-parsers / jsoncpp

A C++ library for interacting with JSON.
Other
8.06k stars 2.63k forks source link

Don't use build dir build interfaces - Fix use with CMake FetchContent #1528

Open matthieugleg opened 7 months ago

matthieugleg commented 7 months ago

This is an updated version of #1419 Fix the issue :

 Imported target "Jsoncpp_lib" includes non-existent path

    "build/_deps/jsoncpp-build/include/json"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

To reproduce, import jsoncpp like that :

FetchContent_Declare(
        jsoncpp
        GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp.git
        GIT_TAG 1.9.5
)
FetchContent_MakeAvailable(jsoncpp)