forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmake_uninstall.cmake.in
23 lines (21 loc) · 924 Bytes
/
cmake_uninstall.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR
"Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif ()
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" FILE_LIST)
string(REGEX REPLACE "\n" ";" FILE_LIST "${FILE_LIST}")
foreach (FILE_NAME ${FILE_LIST})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${FILE_NAME}\"")
if (EXISTS "$ENV{DESTDIR}${FILE_NAME}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${FILE_NAME}\""
OUTPUT_VARIABLE RM_OUT
RETURN_VALUE RM_RETVAL)
if ("${RM_RETVAL}" STREQUAL 0)
else ()
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${FILE_NAME}\"")
endif ()
else ()
message(STATUS "File \"$ENV{DESTDIR}${FILE_NAME}\" does not exist.")
endif ()
endforeach ()