support sudo make uninstall

This commit is contained in:
jasjuang
2017-08-02 22:09:42 -07:00
parent 6c70e74f3c
commit 34193818f9
2 changed files with 37 additions and 0 deletions

View File

@@ -219,3 +219,14 @@ if (GLM_INSTALL_ENABLE)
endif()
export(PACKAGE glm)
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
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()