From 2b6634d5740859b60a265e04fc6abf050823bac4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 5 Dec 2020 21:29:38 +0100 Subject: [PATCH] Allow supplying RapidJSON from outer scope --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35cdab0..abc7d55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,9 @@ set(CONFIGURATION_PACKAGE_SUFFIX "" CACHE STRING "sets the suffix for find_packa find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED) # find RapidJSON -find_package(RapidJSON) +if(NOT RapidJSON_FOUND) + find_package(RapidJSON) +endif() if(NOT RapidJSON_FOUND) message(FATAL_ERROR "Unable to find RapidJSON. Since this is the only supported reflection application at this time, it makes no sense to continue.") endif()