From d77f36e017931d40609730f787f90a401b71bbd8 Mon Sep 17 00:00:00 2001 From: yanghaoran Date: Wed, 9 Dec 2020 17:09:54 +0800 Subject: [PATCH] prioritize json downloading from gitee --- cmake/external_libs/json.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/external_libs/json.cmake b/cmake/external_libs/json.cmake index c4a52843..ce473d4b 100755 --- a/cmake/external_libs/json.cmake +++ b/cmake/external_libs/json.cmake @@ -5,15 +5,15 @@ endif() include(ExternalProject) set(JSON_SRC_DIR ${CMAKE_BINARY_DIR}/opensrc/json/include) -#if (ENABLE_GITEE) -# set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip") -# set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7") -# set(JSON_INCLUDE_DIR "${JSON_SRC_DIR}/include") -#else() -set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip") -set(MD5 "0dc903888211db3a0f170304cd9f3a89") -set(JSON_INCLUDE_DIR ${JSON_SRC_DIR}) -#endif () +if (ENABLE_GITEE) + set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip") + set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7") + set(JSON_INCLUDE_DIR "${JSON_SRC_DIR}/include") +else() + set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip") + set(MD5 "0dc903888211db3a0f170304cd9f3a89") + set(JSON_INCLUDE_DIR ${JSON_SRC_DIR}) +endif () ExternalProject_Add(json_build URL ${REQ_URL} #URL /home/txd/workspace/cloud_code/pkg/include.zip