diff CMakeLists.txt @ 584:a042693cc6a9

uninstall target for make
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Oct 2013 14:21:43 +0200
parents 5790c359e008
children a00f626290db
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Sep 30 17:46:03 2013 +0200
+++ b/CMakeLists.txt	Wed Oct 02 14:21:43 2013 +0200
@@ -377,3 +377,17 @@
 else()
   message("Doxygen not found. The documentation will not be built.")
 endif()
+
+
+#####################################################################
+## Prepare the "uninstall" target
+## http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
+#####################################################################
+
+configure_file(
+    "${CMAKE_CURRENT_SOURCE_DIR}/Resources/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)