cmake_uninstall.cmake.in 942 B

1234567891011121314151617181920212223242526
  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. if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  5. set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
  6. endif()
  7. message(${CMAKE_INSTALL_PREFIX})
  8. file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
  9. string(REGEX REPLACE "\n" ";" files "${files}")
  10. foreach(file ${files})
  11. message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
  12. if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
  13. exec_program(
  14. "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
  15. OUTPUT_VARIABLE rm_out
  16. RETURN_VALUE rm_retval
  17. )
  18. if(NOT "${rm_retval}" STREQUAL 0)
  19. message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
  20. endif()
  21. else()
  22. message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
  23. endif()
  24. endforeach()