rapidjson
rapidjson copied to clipboard
Invalid RapidJSON_INCLUDE_DIRS
30f54566adfc33d303d56e19cedf01f77602e7da (#1901) breaks RapidJSON_INCLUDE_DIRS (RapidJSON_INCLUDE_DIR), the variable have a trailing "/rapidjson" directory now, this change breaks existing includes in external code when using it as include path.
Before: <...>/rapidjson/include/
After: <...>/rapidjson/include/rapidjson
All includes (ex. #include <rapidjson/writer.h>) now broken.
CMakeLists.txt
cmake_minimum_required(VERSION 3.19)
project(example VERSION 1.0.0 LANGUAGES CXX)
find_package(RapidJSON REQUIRED)
add_executable(example example.cpp)
message(STATUS "RapidJSON: ${RapidJSON_INCLUDE_DIRS}")
target_include_directories(example PUBLIC "${RapidJSON_INCLUDE_DIRS}")
example.cpp
#include <rapidjson/writer.h>
int main() {
return 0;
}
The provided example will not compile (Or the compiler will use system-wide RapidJSON not the provided one).