summaryrefslogtreecommitdiff
path: root/CMake/cmake_uninstall.cmake.in
diff options
context:
space:
mode:
authorAlessandro Ghedini <ghedo@debian.org>2017-09-02 11:03:20 +0100
committerAlessandro Ghedini <ghedo@debian.org>2017-09-02 11:03:20 +0100
commit67fff9aac64f68289218e02aad4d9936471046a4 (patch)
treebf712da92dd27ace3b8371f6b8a9d0794f4b2425 /CMake/cmake_uninstall.cmake.in
parentbdd033d6e4a13df5b45f2628db5738f82ca6b413 (diff)
New upstream version 7.55.1
Diffstat (limited to 'CMake/cmake_uninstall.cmake.in')
-rw-r--r--CMake/cmake_uninstall.cmake.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/CMake/cmake_uninstall.cmake.in b/CMake/cmake_uninstall.cmake.in
new file mode 100644
index 00000000..d00a5166
--- /dev/null
+++ b/CMake/cmake_uninstall.cmake.in
@@ -0,0 +1,26 @@
+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")
+
+if (NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
+endif ()
+ message(${CMAKE_INSTALL_PREFIX})
+
+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}")
+ if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ exec_program(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ if(NOT "${rm_retval}" STREQUAL 0)
+ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+ endif(NOT "${rm_retval}" STREQUAL 0)
+ else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+ endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)