rapidjson
rapidjson copied to clipboard
find GTest via find_package
This patch enables the use of GTest from more locations than ../thirdparty/gtest and /usr/src/gtest.
Tested on Linux with cmake-3.25.
If RAPIDJSON_BUILD_TESTS is ON but GTest was not found by the Find-script provided in rapidjson/CMakeModules this patch will try to find GTest via find_package.
This is useful if GTest is not installed in /usr/src/gtest as expected by Find script.
For example when you use CMAKE_INSTALL_PREFIX to install GTest and RapidJSON in a stage directory.