~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to cmake/cmake_uninstall.cmake.in

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2011-08-12 11:16:41 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20110812111641-sg7bj019yhh91mpl
Tags: upstream-2.0~beta2
ImportĀ upstreamĀ versionĀ 2.0~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
 
2
  MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
 
3
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
 
4
 
 
5
SET(DESTDIR $ENV{DESTDIR})
 
6
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
 
7
STRING(REGEX REPLACE "\n" ";" files "${files}")
 
8
FOREACH(file ${files})
 
9
  MESSAGE(STATUS "Uninstalling \"${DESTDIR}${file}\"")
 
10
  IF(EXISTS "${DESTDIR}${file}")
 
11
    EXEC_PROGRAM(
 
12
      "@CMAKE_COMMAND@" ARGS "-E remove \"${DESTDIR}${file}\""
 
13
      OUTPUT_VARIABLE rm_out
 
14
      RETURN_VALUE rm_retval
 
15
      )
 
16
    IF("${rm_retval}" STREQUAL 0)
 
17
    ELSE("${rm_retval}" STREQUAL 0)
 
18
      MESSAGE(FATAL_ERROR "Problem when removing \"${DESTDIR}${file}\"")
 
19
    ENDIF("${rm_retval}" STREQUAL 0)
 
20
  ELSE(EXISTS "${DESTDIR}${file}")
 
21
    MESSAGE(STATUS "File \"${DESTDIR}${file}\" does not exist.")
 
22
  ENDIF(EXISTS "${DESTDIR}${file}")
 
23
ENDFOREACH(file)