Debian Codegraph @

cmake_uninstall.cmake.in

raw
1 # -----------------------------------------------
2 # - cmake_uninstall.cmake.in
3 # File that provides "make uninstall" target
4 # We use the file 'install_manifest.txt'
5 # -----------------------------------------------
6 IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" )
7 MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"" )
8 ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" )
9
10 FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
11 STRING(REGEX REPLACE "\n" ";" files "${files}" )
12 FOREACH(file ${files})
13 MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"" )
14 IF(EXISTS "$ENV{DESTDIR}${file}" )
15 EXEC_PROGRAM(
16 "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
17 OUTPUT_VARIABLE rm_out
18 RETURN_VALUE rm_retval
19 )
20 IF(NOT "${rm_retval}" STREQUAL 0)
21 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"" )
22 ENDIF(NOT "${rm_retval}" STREQUAL 0)
23 ELSE(EXISTS "$ENV{DESTDIR}${file}" )
24 MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist." )
25 ENDIF(EXISTS "$ENV{DESTDIR}${file}" )
26 ENDFOREACH(file)