forked from podofo/podofo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmake_uninstall.cmake.in
18 lines (17 loc) · 804 Bytes
/
cmake_uninstall.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling \"${file}\"")
if(NOT EXISTS "${file}")
message(FATAL_ERROR "File \"${file}\" does not exists.")
endif(NOT EXISTS "${file}")
exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VARIABLE rm_retval)
if("${rm_retval}" GREATER 0)
message(FATAL_ERROR "Problem when removing \"${file}\"")
endif("${rm_retval}" GREATER 0)
endforeach(file)