CMakeLists.txt
changeset 11606 a54e7ade4382
parent 11600 03f7e24556ab
child 11610 6dea196ecbcb
     1.1 --- a/CMakeLists.txt	Thu Oct 12 08:44:45 2017 -0700
     1.2 +++ b/CMakeLists.txt	Thu Oct 12 08:47:02 2017 -0700
     1.3 @@ -1808,10 +1808,12 @@
     1.4  
     1.5  ##### Uninstall target #####
     1.6  
     1.7 -configure_file(
     1.8 -    "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
     1.9 -    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
    1.10 -    IMMEDIATE @ONLY)
    1.11 +if(NOT TARGET uninstall)
    1.12 +  configure_file(
    1.13 +      "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
    1.14 +      "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
    1.15 +      IMMEDIATE @ONLY)
    1.16  
    1.17 -add_custom_target(uninstall
    1.18 -    COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
    1.19 +  add_custom_target(uninstall
    1.20 +      COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
    1.21 +endif()