Remove empty STB files on failed download

Remove lingering empty files on failed download for successful cmake
next time.
This commit is contained in:
tejasvi
2019-11-18 16:07:09 +05:30
parent a2aa6a1e63
commit ceff6a2613
+1
View File
@@ -368,6 +368,7 @@ if (NOT STB_IMAGE_FOUND)
"stb/stb_image.h is not installed. Image utilities will not be available!")
endif ()
else ()
file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/deps/${STB_DIR}/")
list(GET STB_IMAGE_DOWNLOAD_STATUS_LIST 1 STB_DOWNLOAD_ERROR)
message(WARNING
"Could not download stb! Error code ${STB_DOWNLOAD_STATUS}: ${STB_DOWNLOAD_ERROR}! Error log: ${STB_DOWNLOAD_LOG}")