Merge pull request #1619 from j301scott/dev

CMake: Check for existing custom target 'uninstall'
This commit is contained in:
Yann Collet 2019-06-10 11:56:49 -07:00 committed by GitHub
commit c601622aa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,10 +194,12 @@ if (ZSTD_BUILD_STATIC)
endif ()
# uninstall target
configure_file(
if (NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif ()