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