1 # http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
3 IF(NOT EXISTS "/home/rvb/git/rtl_433/build/install_manifest.txt")
4 MESSAGE(FATAL_ERROR "Cannot find install manifest: \"/home/rvb/git/rtl_433/build/install_manifest.txt\"")
5 ENDIF(NOT EXISTS "/home/rvb/git/rtl_433/build/install_manifest.txt")
7 FILE(READ "/home/rvb/git/rtl_433/build/install_manifest.txt" files)
8 STRING(REGEX REPLACE "\n" ";" files "${files}")
10 MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
11 IF(EXISTS "$ENV{DESTDIR}${file}")
13 "/usr/bin/cmake" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
14 OUTPUT_VARIABLE rm_out
15 RETURN_VALUE rm_retval
17 IF(NOT "${rm_retval}" STREQUAL 0)
18 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
19 ENDIF(NOT "${rm_retval}" STREQUAL 0)
20 ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}")
22 "/usr/bin/cmake" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
23 OUTPUT_VARIABLE rm_out
24 RETURN_VALUE rm_retval
26 IF(NOT "${rm_retval}" STREQUAL 0)
27 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
28 ENDIF(NOT "${rm_retval}" STREQUAL 0)
29 ELSE(EXISTS "$ENV{DESTDIR}${file}")
30 MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
31 ENDIF(EXISTS "$ENV{DESTDIR}${file}")