diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt index 4666ed4f1a..86d2228e68 100644 --- a/cmake.deps/CMakeLists.txt +++ b/cmake.deps/CMakeLists.txt @@ -88,7 +88,11 @@ foreach(dep ${DEPENDENCIES}) list(GET dep 0 name) list(GET dep 1 value) if(NOT ${name}) - set(${name} ${value}) + # _URL variables must NOT be set when USE_EXISTING_SRC_DIR is set, + # otherwise ExternalProject will try to re-download the sources. + if(NOT USE_EXISTING_SRC_DIR) + set(${name} ${value}) + endif() endif() endforeach()