| 1 |
#.rst: |
| 2 |
# FindRapidJSON |
| 3 |
# ----------- |
| 4 |
# Finds the RapidJSON library |
| 5 |
# |
| 6 |
# This will define the following variables:: |
| 7 |
# |
| 8 |
# RAPIDJSON_FOUND - system has RapidJSON parser |
| 9 |
# RAPIDJSON_INCLUDE_DIRS - the RapidJSON parser include directory |
| 10 |
# |
| 11 |
|
| 12 |
#find_package(PkgConfig) |
| 13 |
#if(PKG_CONFIG_FOUND) |
| 14 |
# pkg_check_modules(PC_RapidJSON RapidJSON>=${RapidJSON_FIND_VERSION} QUIET) |
| 15 |
#endif() |
| 16 |
# |
| 17 |
#if(PC_RapidJSON_VERSION) |
| 18 |
# set(RapidJSON_VERSION ${PC_RapidJSON_VERSION}) |
| 19 |
#else() |
| 20 |
# find_package(RapidJSON ${RapidJSON_FIND_VERSION} CONFIG REQUIRED QUIET) |
| 21 |
#endif() |
| 22 |
|
| 23 |
find_path(RapidJSON_INCLUDE_DIR NAMES rapidjson/rapidjson.h |
| 24 |
PATHS ${PC_RapidJSON_INCLUDEDIR}) |
| 25 |
|
| 26 |
|
| 27 |
include(FindPackageHandleStandardArgs) |
| 28 |
find_package_handle_standard_args(RapidJSON |
| 29 |
REQUIRED_VARS RapidJSON_INCLUDE_DIR) |
| 30 |
|
| 31 |
if(RAPIDJSON_FOUND) |
| 32 |
set(RAPIDJSON_INCLUDE_DIRS ${RapidJSON_INCLUDE_DIR}) |
| 33 |
endif() |
| 34 |
|
| 35 |
mark_as_advanced(RapidJSON_INCLUDE_DIR) |
| 36 |
|