cmake: Support make uninstall.
[vlc.git] / extras / buildsystem / cmake / CMakeLists / root_CMakeLists.txt
index 84d0a3f..7ab145e 100644 (file)
@@ -28,6 +28,15 @@ add_subdirectory(src)
 add_subdirectory(modules)
 add_subdirectory(po)
 
+# Enable uninstall
+configure_file(
+  "${CMAKE_CURRENT_SOURCE_DIR}/extras/buildsystem/cmake/cmake_uninstall.cmake.in"
+  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+  IMMEDIATE @ONLY)
+
+add_custom_target(uninstall
+  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+
 # Enable CPack: Automatic package creation
 
 set(README "${CMAKE_CURRENT_SOURCE_DIR}/README")