ES-DE/CMake/Packages/FindRapidJSON.cmake
Leon Styhre fb4c5708b7 Made pugixml an external dependency and fixed the cmake/cpack installation and package creation.
As pugixml seems to be well supported nowadays and seems to ship with most distributions it's pretty pointless to keep bundling it with EmulationStation.
2020-06-24 17:38:41 +02:00

29 lines
720 B
CMake

# Find the RapidJSON parsing library.
#
# Sets the usual variables expected for find_package scripts:
#
# RAPIDJSON_INCLUDE_DIR - header location
# RAPIDJSON_FOUND - true if RAPIDJSON was found.
include(FindPkgMacros)
if (NOT WIN32)
find_package(PkgConfig)
pkg_check_modules(RAPIDJSON REQUIRED RapidJSON>=1.0.0)
endif (NOT WIN32)
if (WIN32)
find_path(RAPIDJSON_INCLUDE_DIR rapidjson/rapidjson.h)
# Support the REQUIRED and QUIET arguments, and set RAPIDJSON_FOUND if found.
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args(RAPIDJSON DEFAULT_MSG RAPIDJSON_INCLUDE_DIR)
if (NOT RAPIDJSON_INCLUDE_DIR)
message(FATAL_ERROR "RapidJSON include files not found!")
endif()
endif (WIN32)