summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-07-20 23:10:37 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-07-20 23:10:37 +0000
commit3c0fb8f0a06b1a3fe7fe94259b48558aeaa2845d (patch)
tree079d0b7cf5d8662663c04f7a85cdc9c3339be9f7 /CMakeScripts
parentTry to fix CI (diff)
parentcmake: update uninstall target (diff)
downloadinkscape-3c0fb8f0a06b1a3fe7fe94259b48558aeaa2845d.tar.gz
inkscape-3c0fb8f0a06b1a3fe7fe94259b48558aeaa2845d.zip
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/cmake_uninstall.cmake.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/CMakeScripts/cmake_uninstall.cmake.in b/CMakeScripts/cmake_uninstall.cmake.in
new file mode 100644
index 000000000..2037e3653
--- /dev/null
+++ b/CMakeScripts/cmake_uninstall.cmake.in
@@ -0,0 +1,21 @@
+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}")
+ 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)