diff options
author | Matthew Albrecht <mattparks5855@gmail.com> | 2019-09-20 15:15:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 15:15:11 -0500 |
commit | a4338ca124a8ed3979bae6cc14ee47e79468c7d7 (patch) | |
tree | ea4b22c6a466f501ffb5761f0326c7217a2c6930 | |
parent | dd210a6fc3e621feadfb212031e596eb18c252e5 (diff) | |
download | portable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.tar.gz portable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.tar.bz2 portable-a4338ca124a8ed3979bae6cc14ee47e79468c7d7.zip |
Check for existing uninstall target before creating.
-rw-r--r-- | CMakeLists.txt | 14 |
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}) |
358 | endif() | 358 | endif() |
359 | 359 | ||
360 | configure_file( | 360 | if(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 | ||
365 | add_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) |
368 | endif() | ||