aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66ac3b0..e198f7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -357,10 +357,12 @@ if(NOT MSVC)
357 DESTINATION ${CMAKE_INSTALL_LIBDIR}) 357 DESTINATION ${CMAKE_INSTALL_LIBDIR})
358endif() 358endif()
359 359
360configure_file( 360if(NOT TARGET uninstall)
361 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" 361 configure_file(
362 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" 362 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
363 IMMEDIATE @ONLY) 363 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
364 IMMEDIATE @ONLY)
364 365
365add_custom_target(uninstall 366 add_custom_target(uninstall
366 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) 367 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
368endif()