2016-10-26 08:21:58 +08:00
|
|
|
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
|
|
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
|
|
|
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
2015-11-04 12:02:43 +08:00
|
|
|
|
2016-10-26 08:21:58 +08:00
|
|
|
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
2015-11-04 12:02:43 +08:00
|
|
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
|
|
|
foreach(file ${files})
|
|
|
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
|
|
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$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(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
|
|
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
|
|
|
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
|
|
|
endforeach(file)
|
|
|
|
|
2015-11-04 13:36:14 +08:00
|
|
|
message(STATUS "Uninstalling @INC_DEST_DIR@/xlnt")
|
|
|
|
|
2015-11-04 12:02:43 +08:00
|
|
|
exec_program("@CMAKE_COMMAND@"
|
2015-11-04 13:36:14 +08:00
|
|
|
ARGS "-E remove_directory @INC_DEST_DIR@/xlnt"
|
|
|
|
OUTPUT_VARIABLE rm_out
|
|
|
|
RETURN_VALUE rm_retval
|
2015-11-04 12:02:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT "${rm_retval}" STREQUAL 0)
|
|
|
|
message(FATAL_ERROR "Problem when removing @INC_DEST_DIR@/xlnt")
|
|
|
|
endif()
|