aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2017-03-26 18:39:22 +0200
committerwsnipex <wsnipex@a1.net>2017-03-26 19:58:12 +0200
commit51fcf46f0c1f50489480f4af5884ba22a3850415 (patch)
tree6af007e51edbf8a2a4f5d21ff846d3fbff5cc7cd /cmake
parent76a0617a3801657c530d3f3200b5b8253ebd75b0 (diff)
[cmake] fail if rapidjson is not found
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindRapidJSON.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmake/modules/FindRapidJSON.cmake b/cmake/modules/FindRapidJSON.cmake
index ddd5448603..3b1f71dcbe 100644
--- a/cmake/modules/FindRapidJSON.cmake
+++ b/cmake/modules/FindRapidJSON.cmake
@@ -10,17 +10,22 @@
#
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_RapidJSON RapidJSON QUIET)
+ pkg_check_modules(PC_RapidJSON RapidJSON>=1.0.2 QUIET)
+endif()
+
+if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore)
+ set(RapidJSON_VERSION 1.0.2)
+else()
+ set(RapidJSON_VERSION ${PC_RapidJSON_VERSION})
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
+find_package_handle_standard_args(RapidJSON
+ REQUIRED_VARS RapidJSON_INCLUDE_DIR RapidJSON_VERSION
VERSION_VAR RapidJSON_VERSION)
if(RAPIDJSON_FOUND)