Don't clobber higher-level uninstall targets.

This commit is contained in:
Camilla Berglund 2011-07-27 15:46:19 +02:00
parent 673b42d8da
commit 7268fc18b4

View File

@ -155,11 +155,14 @@ install(FILES COPYING.txt readme.html
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Uninstall operation # Uninstall operation
# Don't generate this target if a higher-level project already has
#-------------------------------------------------------------------- #--------------------------------------------------------------------
configure_file(${GLFW_SOURCE_DIR}/cmake_uninstall.cmake.in if(NOT TARGET uninstall)
${GLFW_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY) configure_file(${GLFW_SOURCE_DIR}/cmake_uninstall.cmake.in
${GLFW_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY)
add_custom_target(uninstall add_custom_target(uninstall
${CMAKE_COMMAND} -P ${CMAKE_COMMAND} -P
${GLFW_BINARY_DIR}/cmake_uninstall.cmake) ${GLFW_BINARY_DIR}/cmake_uninstall.cmake)
endif()