aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Albrecht <mattparks5855@gmail.com>2019-09-20 15:15:11 -0500
committerGitHub <noreply@github.com>2019-09-20 15:15:11 -0500
commita4338ca124a8ed3979bae6cc14ee47e79468c7d7 (patch)
treeea4b22c6a466f501ffb5761f0326c7217a2c6930
parentdd210a6fc3e621feadfb212031e596eb18c252e5 (diff)
downloadportable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.tar.gz
portable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.tar.bz2
portable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.zip
Check for existing uninstall target before creating.
-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()