UninstallHelper.cmake (510B)
1 if(NOT EXISTS "${CMAKE_BINARY_DIR}/install_manifest.txt") 2 message(FATAL_ERROR "Cannot find install manifest: ${CMAKE_BINARY_DIR}/install_manifest.txt") 3 endif() 4 5 file(STRINGS "${CMAKE_BINARY_DIR}/install_manifest.txt" files) 6 foreach(file ${files}) 7 message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 8 if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 9 file(REMOVE $ENV{DESTDIR}${file}) 10 else() 11 message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 12 endif() 13 endforeach()