2012-08-13 21:47:32 +04:00
|
|
|
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
|
|
|
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2005-01-18 16:58:27 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
2014-04-06 23:51:33 +04:00
|
|
|
string(REPLACE "\n" ";" files "${files}")
|
2012-08-13 21:47:32 +04:00
|
|
|
foreach(file ${files})
|
|
|
|
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
|
|
|
if(EXISTS "$ENV{DESTDIR}${file}")
|
|
|
|
exec_program(
|
2007-01-22 18:39:16 +03:00
|
|
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
2006-06-05 22:13:03 +04:00
|
|
|
OUTPUT_VARIABLE rm_out
|
|
|
|
RETURN_VALUE rm_retval
|
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
if("${rm_retval}" STREQUAL 0)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endforeach()
|