aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2015-09-10 10:18:28 +0200
committermontellese <montellese@xbmc.org>2017-03-24 07:55:50 +0100
commit15017d865b4e0b8066e4352c7872b8309db0d365 (patch)
treeb6a04193cc059d443b5b8ad01ba7e9d9dac315cf /cmake
parent542333b5bb14818ea7c10291ebef620676659fb4 (diff)
[depends/cmake/win32] replace yajl with rapidjson (thanks to hudokkow)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindRapidJSON.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/modules/FindRapidJSON.cmake b/cmake/modules/FindRapidJSON.cmake
new file mode 100644
index 0000000000..991cd071e8
--- /dev/null
+++ b/cmake/modules/FindRapidJSON.cmake
@@ -0,0 +1,31 @@
+#.rst:
+# FindRapidJSON
+# -----------
+# Finds the RapidJSON library
+#
+# This will define the following variables::
+#
+# RapidJSON_FOUND - system has RapidJSON parser
+# RapidJSON_INCLUDE_DIRS - the RapidJSON parser include directory
+#
+
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_RapidJSON RapidJSON QUIET)
+endif()
+
+find_path(RapidJSON_INCLUDE_DIR NAMES rapidjson/rapidjson.h
+ PATHS ${PC_RapidJSON_INCLUDEDIR})
+
+set(RapidJSON_VERSION ${PC_RapidJSON_VERSION})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(RapidJSON
+ REQUIRED_VARS RapidJSON_INCLUDE_DIR
+ VERSION_VAR RapidJSON_VERSION)
+
+if(RapidJSON_FOUND)
+ set(RapidJSON_INCLUDE_DIRS ${RapidJSON_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(RapidJSON_INCLUDE_DIR)
+