cmake_uninstall.cmake.in 794 B

12345678910111213141516171819202122
  1. if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
  2. message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
  3. endif()
  4. file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
  5. string(REPLACE "\n" ";" files "${files}")
  6. foreach(file ${files})
  7. message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
  8. if(EXISTS "$ENV{DESTDIR}${file}")
  9. execute_process(
  10. COMMAND "@CMAKE_COMMAND@" -E rm -f "$ENV{DESTDIR}${file}"
  11. OUTPUT_VARIABLE rm_out
  12. RESULT_VARIABLE rm_retval
  13. )
  14. if("${rm_retval}" STREQUAL 0)
  15. else()
  16. message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
  17. endif()
  18. else()
  19. message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
  20. endif()
  21. endforeach()