CMake error building example on Windows 10

When building the examples, CMake is emitting the following error indicating that it is looking for a namespace’d prefixed import target.
“… Target “fly_mission” links to target “JsonCpp::JsonCpp” but the target was not found. …”

jsoncpp is installed via vcpkg and I have checked that it can used via the following sequence of CMake statements.

list(APPEND CMAKE_PREFIX_PATH “$ENV{VCPKG_ROOT}\installed\x64-windows\share\jsoncpp”)

find_package(jsoncpp REQUIRED)
get_target_property(JSON_INC_PATH jsoncpp_lib INTERFACE_INCLUDE_DIRECTORIES)


target_include_directories(${PROJECT_NAME} PUBLIC ${JSON_INC_PATH})

target_link_libraries(${PROJECT_NAME} jsoncpp_lib)

JsonCpp does not seem to provide namespace prefixed targets. Additionally, since I had to append to CMAKE_PREFIX_PATH, and specifying $ENV{VCPKG_ROOT}\scripts\buildsystems\vcpkg.cmake as the toolchain file did not work like for some other vcpkg installed libraries I have used, it seems that perhaps something in my setup is lacking.

Any help what I could do to resolve the error trying to build the example?


Thanks,