The second find_package will cause error
https://github.com/Tencent/rapidjson/blob/24b5e7a8b27f42fa16b96fc70aade9106cf7102f/RapidJSONConfig.cmake.in#L10-L12
cmake 用<PackageName>_DIR 存储configuration file的目录。 RapidJSON_DIR被覆盖后会报错。
Reproduced on current master with an installed package: the first find_package(RapidJSON CONFIG REQUIRED) overwrites RapidJSON_DIR with the producer build directory; the second lookup then tries to include a nonexistent RapidJSON-targets.cmake from that directory. I am preparing a narrow fix that preserves CMake discovery state, plus a repeated-discovery consumer regression. The broader open CMake PR #2340 also edits this variable, but still overwrites it. Prepared with Codex assistance.