CMakeUninstall.cmake.in 879 B

1234567891011121314151617181920212223242526
  1. if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
  2. message(
  3. FATAL_ERROR
  4. "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
  5. endif()
  6. file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
  7. string(REGEX REPLACE "\n" ";" files "${files}")
  8. foreach(file ${files})
  9. message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
  10. if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
  11. exec_program(
  12. "@CMAKE_COMMAND@"
  13. ARGS
  14. "-E remove \"$ENV{DESTDIR}${file}\""
  15. OUTPUT_VARIABLE
  16. rm_out
  17. RETURN_VALUE
  18. rm_retval)
  19. if(NOT "${rm_retval}" STREQUAL 0)
  20. message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
  21. endif()
  22. else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
  23. message(STATUS "File $ENV{DESTDIR}${file} does not exist")
  24. endif()
  25. endforeach()