From eb2f6f8edc87d5e5b1d233fffd6adc734c4ad433 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Tue, 25 Jul 2017 11:57:52 -0700 Subject: [PATCH] bootstrapping fix --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b42038..293fd2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,8 @@ execute_process( ERROR_QUIET ) -find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_SOURCE_DIR}/thirdparty) -if (NOT RAPIDJSON) +find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_SOURCE_DIR}/thirdparty) +if (NOT RAPIDJSONTEST) message("no rapidjson, download") set(RJ_TAR_FILE ${CMAKE_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz) file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE}) @@ -42,7 +42,10 @@ if (NOT RAPIDJSON) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/thirdparty ) file(REMOVE ${RJ_TAR_FILE}) -endif(NOT RAPIDJSON) +endif(NOT RAPIDJSONTEST) + +find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_SOURCE_DIR}/thirdparty) + add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) # add subdirs