2012-08-13 17:47:32 +00: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 17:50:14 +00:00
|
|
|
endif()
|
2005-01-18 13:58:27 +00:00
|
|
|
|
2012-08-13 17:47:32 +00:00
|
|
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
|
|
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
|
|
|
foreach(file ${files})
|
|
|
|
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
|
|
|
if(EXISTS "$ENV{DESTDIR}${file}")
|
|
|
|
exec_program(
|
2007-01-22 15:39:16 +00:00
|
|
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
2006-06-05 18:13:03 +00:00
|
|
|
OUTPUT_VARIABLE rm_out
|
|
|
|
RETURN_VALUE rm_retval
|
|
|
|
)
|
2012-08-13 17:47:32 +00:00
|
|
|
if("${rm_retval}" STREQUAL 0)
|
2012-08-13 17:50:14 +00:00
|
|
|
else()
|
2012-08-13 17:47:32 +00:00
|
|
|
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
|
|
|
else()
|
2012-08-13 17:47:32 +00:00
|
|
|
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
2012-08-13 17:50:14 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|