File: cmake_uninstall.cmake.in

package info (click to toggle)
cppcheck 1.76.1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 13,608 kB
  • sloc: cpp: 140,390; python: 3,430; ansic: 2,808; xml: 670; makefile: 501; sh: 237
file content (16 lines) | stat: -rw-r--r-- 693 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -----------------------------------------------
# File that provides "make uninstall" target
#  We use the file 'install_manifest.txt'
# -----------------------------------------------
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
  message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")

file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
  message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
	execute_process(COMMAND rm $ENV{DESTDIR}${file})
endforeach(file)