Imported Upstream version 1.4
[deb_x265.git] / source / cmake / cmake_uninstall.cmake.in
CommitLineData
72b9787e
JB
1if(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
3endif()\r
4\r
5file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)\r
6string(REGEX REPLACE "\n" ";" files "${files}")\r
7foreach(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
19endforeach(file)\r