aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'host/cmake')
-rw-r--r--host/cmake/cmake_uninstall.cmake.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/cmake/cmake_uninstall.cmake.in b/host/cmake/cmake_uninstall.cmake.in
index 6031a6ca9..b4d731a14 100644
--- a/host/cmake/cmake_uninstall.cmake.in
+++ b/host/cmake/cmake_uninstall.cmake.in
@@ -17,6 +17,17 @@ 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(NOT "${CMAKE_VERSION}" STRLESS "2.8.1")
+ IF(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)
+ ENDIF(IS_SYMLINK "$ENV{DESTDIR}${file}")
ELSE(EXISTS "$ENV{DESTDIR}${file}")
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
ENDIF(EXISTS "$ENV{DESTDIR}${file}")