1 ## =========================================================================
2 ## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 ## =========================================================================
5 if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
6 message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
7 endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
9 file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
10 string(REGEX REPLACE "\n" ";" files "${files}")
11 foreach(file ${files})
12 message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
13 if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
15 "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
16 OUTPUT_VARIABLE rm_out
17 RETURN_VALUE rm_retval
19 if(NOT "${rm_retval}" STREQUAL 0)
20 message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
21 endif(NOT "${rm_retval}" STREQUAL 0)
22 else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
23 message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
24 endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")