cmake_uninstall.cmake.in 790 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. exec_program(
  10. "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
  11. OUTPUT_VARIABLE rm_out
  12. RETURN_VALUE 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()