CMakeLists: include path fix + compatibility.
diff --git a/CMakeLists.txt b/CMakeLists.txt index c02301c..be860c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -195,7 +195,7 @@ # Add an interface target to export it add_library(RapidJSON INTERFACE) -target_include_directories(RapidJSON INTERFACE $<INSTALL_INTERFACE:include/rapidjson>) +target_include_directories(RapidJSON INTERFACE $<INSTALL_INTERFACE:include>) install(DIRECTORY include/rapidjson DESTINATION "${INCLUDE_INSTALL_DIR}"
diff --git a/RapidJSONConfig.cmake.in b/RapidJSONConfig.cmake.in index a8ca78f..0ee1d9d 100644 --- a/RapidJSONConfig.cmake.in +++ b/RapidJSONConfig.cmake.in
@@ -17,3 +17,7 @@ get_target_property(RapidJSON_INCLUDE_DIR RapidJSON INTERFACE_INCLUDE_DIRECTORIES) set( RapidJSON_INCLUDE_DIRS ${RapidJSON_INCLUDE_DIR} ) + +if(NOT TARGET rapidjson) + add_library(rapidjson ALIAS RapidJSON) +endif()