BastionGuard/cmake/cmake_uninstall.cmake.in
specialworld83 d34e319fbe Public release
2026-02-27 21:37:06 +01:00

28 lines
1.2 KiB
CMake

# -----------------------------------------------------------------------------
# BastionGuard - Script di disinstallazione generato automaticamente da CMake
# -----------------------------------------------------------------------------
# Usa il file "install_manifest.txt" generato al momento del `make install`
# per rimuovere ogni file installato.
# -----------------------------------------------------------------------------
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "❌ Impossibile trovare install_manifest.txt.
Esegui prima 'make install' per generarlo.")
endif()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" _files)
string(REGEX REPLACE "\n" ";" _files "${_files}")
message(STATUS "🧹 Avvio disinstallazione completa di BastionGuard...")
foreach(_file ${_files})
if(EXISTS "${_file}" OR IS_SYMLINK "${_file}")
message(STATUS "Rimuovo: ${_file}")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove "${_file}")
else()
message(WARNING "File non trovato (forse già rimosso): ${_file}")
endif()
endforeach()
message(STATUS "✅ Disinstallazione BastionGuard completata con successo.")