linux CMakeLists.txt: don't call file(REMOVE) if the glob list is empty

This commit is contained in:
Pato05 2024-02-17 15:07:36 +01:00
parent 6e220073d8
commit 14ff02b65c
No known key found for this signature in database
GPG key ID: F53CA394104BA0CB

View file

@ -147,7 +147,9 @@ endif()
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
# Remove old tarballs
file(GLOB REMOVE_OLD_TARBALLS ${PROJECT_BINARY_DIR}/freezer-linux-*.tar.gz)
if (REMOVE_OLD_TARBALLS)
file(REMOVE ${REMOVE_OLD_TARBALLS})
endif()
# Configure the script to create a new tarball, and run it as a target
configure_file(create-tarball.sh ${PROJECT_BINARY_DIR} @ONLY