diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-10-25 17:28:50 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-10-25 17:28:50 -0400 |
commit | d26a6f2e650c22b932352a91f23e572ff18c38b4 (patch) | |
tree | af0ab55eb781a68c81340a32b7256376330c9b7f /cmake/cmake_uninstall.cmake.in | |
parent | 9c853b962d73565f2980789a32f347309bcc605f (diff) |
cmake: adding uninstall rule to remove symlinks, too.
I wish this could have been done in a single, compound IF, but
cmake didn't like the OR for this one.
Diffstat (limited to 'cmake/cmake_uninstall.cmake.in')
-rw-r--r-- | cmake/cmake_uninstall.cmake.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in index 6031a6ca98..9ae1ae4bd6 100644 --- a/cmake/cmake_uninstall.cmake.in +++ b/cmake/cmake_uninstall.cmake.in @@ -17,6 +17,15 @@ FOREACH(file ${files}) IF(NOT "${rm_retval}" STREQUAL 0) MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSEIF(IS_SYMLINK "$ENV{DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) ELSE(EXISTS "$ENV{DESTDIR}${file}") MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") ENDIF(EXISTS "$ENV{DESTDIR}${file}") |