diff options
Diffstat (limited to 'third-party/cmake/DownloadAndExtractFile.cmake')
-rw-r--r-- | third-party/cmake/DownloadAndExtractFile.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/third-party/cmake/DownloadAndExtractFile.cmake b/third-party/cmake/DownloadAndExtractFile.cmake index 43100c0431..eb5c1c6602 100644 --- a/third-party/cmake/DownloadAndExtractFile.cmake +++ b/third-party/cmake/DownloadAndExtractFile.cmake @@ -23,8 +23,11 @@ set(SRC_DIR ${PREFIX}/src/${TARGET}) # Check whether the source has been downloaded. If true, skip it. # Useful for external downloads like homebrew. if(EXISTS "${SRC_DIR}" AND IS_DIRECTORY "${SRC_DIR}") - message(STATUS "${SRC_DIR} is found, skipping download and extraction. ") - return() + file(GLOB EXISTED_FILES "${SRC_DIR}/*") + if(EXISTED_FILES) + message(STATUS "${SRC_DIR} is found and not empty, skipping download and extraction. ") + return() + endif() endif() # Taken from ExternalProject_Add. Let's hope we can drop this one day when |