mirror-chatterino2/cmake/FindRapidJSON.cmake
pajlada e00938dfde
Add support for CMake (buildsystem generator) (#2468)
Co-authored-by: Edgar <Edgar@AnotherFoxGuy.com>
2021-03-28 16:58:51 +02:00

15 lines
497 B
CMake

include(FindPackageHandleStandardArgs)
find_path(RapidJSON_INCLUDE_DIRS rapidjson/rapidjson.h HINTS ${CMAKE_SOURCE_DIR}/lib/rapidjson/include)
find_package_handle_standard_args(RapidJSON DEFAULT_MSG RapidJSON_INCLUDE_DIRS)
if (RapidJSON_FOUND)
add_library(RapidJSON::RapidJSON INTERFACE IMPORTED)
set_target_properties(RapidJSON::RapidJSON PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${RapidJSON_INCLUDE_DIRS}"
)
endif ()
mark_as_advanced(RapidJSON_INCLUDE_DIRS)