mirror-chatterino2/cmake/FindRapidJSON.cmake
kornes b14bfd2aad
Fix vcpkg manifest and finding RapidJSON and Websocketpp modules (#3753)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2022-05-21 15:38:10 +00:00

14 lines
493 B
CMake

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