[x265] [PATCH ] Add support for uninstall in windows

mythreyi at multicorewareinc.com mythreyi at multicorewareinc.com
Tue Nov 14 05:20:24 CET 2017


# HG changeset patch
# User Mythreyi P
# Date 1510550268 -19800
#      Mon Nov 13 10:47:48 2017 +0530
# Node ID 198fac8283efc3e3665842eadbf7e03af5987637
# Parent  fa556484e9663a65aabc839f333e0e98fd6f80f2
Add support for uninstall in windows

Files installed in the INSTALL target are uninstalled.

diff -r fa556484e966 -r 198fac8283ef source/CMakeLists.txt
--- a/source/CMakeLists.txt	Fri Nov 10 11:46:13 2017 +0530
+++ b/source/CMakeLists.txt	Mon Nov 13 10:47:48 2017 +0530
@@ -726,3 +726,13 @@
         set(PLATFORM_LIBS ${PLATFORM_LIBS} PARENT_SCOPE)
     endif(PLATFORM_LIBS)
 endif(hasParent)
+
+# uninstall target
+if(NOT TARGET UNINSTALL)
+    configure_file(
+        "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+        "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+        IMMEDIATE @ONLY)
+    add_custom_target(UNINSTALL
+        COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+endif()
diff -r fa556484e966 -r 198fac8283ef source/cmake/cmake_uninstall.cmake.in
--- a/source/cmake/cmake_uninstall.cmake.in	Fri Nov 10 11:46:13 2017 +0530
+++ b/source/cmake/cmake_uninstall.cmake.in	Mon Nov 13 10:47:48 2017 +0530
@@ -17,3 +17,7 @@
         message(STATUS "File '$ENV{DESTDIR}${file}' does not exist.")
     endif()
 endforeach(file)
+
+if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+    file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+endif()


More information about the x265-devel mailing list