2 if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt")
3 message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"")
6 file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files)
7 string(REGEX REPLACE "\n" ";" files "${files}")
9 foreach (file ${files})
10 message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
11 if (EXISTS "$ENV{DESTDIR}${file}")
12 exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
13 OUTPUT_VARIABLE rm_out
14 RETURN_VALUE rm_retval)
15 if (NOT "${rm_retval}" STREQUAL 0)
16 MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
18 elseif (IS_SYMLINK "$ENV{DESTDIR}${file}")
19 EXEC_PROGRAM("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
20 OUTPUT_VARIABLE rm_out
21 RETURN_VALUE rm_retval)
22 if (NOT "${rm_retval}" STREQUAL 0)
23 message(FATAL_ERROR "Problem when removing symlink \"$ENV{DESTDIR}${file}\"")
26 message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")