2005-01-18 16:58:27 +03: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\"")
|
|
|
|
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
|
|
|
|
|
|
|
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
|
|
|
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
|
|
|
FOREACH(file ${files})
|
2007-01-22 18:39:16 +03:00
|
|
|
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
|
|
|
IF(EXISTS "$ENV{DESTDIR}${file}")
|
2006-06-05 22:13:03 +04:00
|
|
|
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
|
|
|
|
)
|
|
|
|
IF("${rm_retval}" STREQUAL 0)
|
|
|
|
ELSE("${rm_retval}" STREQUAL 0)
|
2007-01-22 18:39:16 +03:00
|
|
|
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
2006-06-05 22:13:03 +04:00
|
|
|
ENDIF("${rm_retval}" STREQUAL 0)
|
2007-01-22 18:39:16 +03:00
|
|
|
ELSE(EXISTS "$ENV{DESTDIR}${file}")
|
|
|
|
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
|
|
|
ENDIF(EXISTS "$ENV{DESTDIR}${file}")
|
2005-01-18 16:58:27 +03:00
|
|
|
ENDFOREACH(file)
|