| 1 |
################################################################################ |
| 2 |
# CMake minimum version required |
| 3 |
cmake_minimum_required(VERSION 3.0) |
| 4 |
|
| 5 |
################################################################################ |
| 6 |
# RapidJSON source dir |
| 7 |
set( RapidJSON_SOURCE_DIR "@CONFIG_SOURCE_DIR@") |
| 8 |
|
| 9 |
################################################################################ |
| 10 |
# RapidJSON build dir |
| 11 |
set( RapidJSON_DIR "@CONFIG_DIR@") |
| 12 |
|
| 13 |
################################################################################ |
| 14 |
# Compute paths |
| 15 |
get_filename_component(RapidJSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) |
| 16 |
|
| 17 |
set( RapidJSON_INCLUDE_DIR "@RapidJSON_INCLUDE_DIR@" ) |
| 18 |
set( RapidJSON_INCLUDE_DIRS "@RapidJSON_INCLUDE_DIR@" ) |
| 19 |
message(STATUS "RapidJSON found. Headers: ${RapidJSON_INCLUDE_DIRS}") |
| 20 |
|
| 21 |
if(NOT TARGET rapidjson) |
| 22 |
add_library(rapidjson INTERFACE IMPORTED) |
| 23 |
set_property(TARGET rapidjson PROPERTY |
| 24 |
INTERFACE_INCLUDE_DIRECTORIES ${RapidJSON_INCLUDE_DIRS}) |
| 25 |
endif() |