Linux CMakeLists.txt: remove old tarballs

This commit is contained in:
Pato05 2024-02-15 00:00:36 +01:00
parent 99fef45fb8
commit fa12f3120d
No known key found for this signature in database
GPG key ID: ED4C6F9C3D574FB6

View file

@ -145,6 +145,11 @@ endif()
# === Create Tarball === # === Create Tarball ===
# Make a tarball out of the install bundle (only in Release mode) # Make a tarball out of the install bundle (only in Release mode)
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
# Remove old tarballs
file(GLOB REMOVE_OLD_TARBALLS ${PROJECT_BINARY_DIR}/freezer-linux-*.tar.gz)
file(REMOVE ${REMOVE_OLD_TARBALLS})
# Configure the script to create a new tarball, and run it as a target
configure_file(create-tarball.sh ${PROJECT_BINARY_DIR} @ONLY configure_file(create-tarball.sh ${PROJECT_BINARY_DIR} @ONLY
FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
add_custom_target(create_tar ALL COMMAND "${PROJECT_BINARY_DIR}/create-tarball.sh") add_custom_target(create_tar ALL COMMAND "${PROJECT_BINARY_DIR}/create-tarball.sh")