The package rapidjson provides CMake integration: find_package(RapidJSON REQUIRED) target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS})