open-source-parsers / jsoncpp

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

cmake export configuration: allow repeating find_package(jsoncpp) calls #1491

Closed zeroxia closed 6 days ago

zeroxia commented 1 year ago

In jsoncpp-namspaced-targets.cmake, it creates JsonCpp::JsonCpp imported library without first checking whether it was already created by former call to find_package(JsonCpp).

As CMake allows repeated call to find_package(), the error of "another target with the same name already exists" should be fixed.