summaryrefslogtreecommitdiffhomepage
path: root/src/external/glfw/cmake_uninstall.cmake.in
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-05-11 01:41:24 +0200
committerGitHub <[email protected]>2018-05-11 01:41:24 +0200
commit281dbf5d83a777df6aecc4a456b277b23f42ba88 (patch)
tree778ff14eae7a0d20df5e652fffd16366cf2313ba /src/external/glfw/cmake_uninstall.cmake.in
parentb8ca51fd01a68b9b6040f8c3c631eedefd7d7735 (diff)
parenta0f9c2b1eb4fbc25472a3f164c7af349fcc0562e (diff)
downloadraylib-281dbf5d83a777df6aecc4a456b277b23f42ba88.tar.gz
raylib-281dbf5d83a777df6aecc4a456b277b23f42ba88.zip
Merge pull request #538 from a3f/master
CMake+CI: Add Wayland configuration
Diffstat (limited to 'src/external/glfw/cmake_uninstall.cmake.in')
-rw-r--r--src/external/glfw/cmake_uninstall.cmake.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/external/glfw/cmake_uninstall.cmake.in b/src/external/glfw/cmake_uninstall.cmake.in
new file mode 100644
index 00000000..4ea57b1c
--- /dev/null
+++ b/src/external/glfw/cmake_uninstall.cmake.in
@@ -0,0 +1,29 @@
+
+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" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+
+foreach (file ${files})
+ message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
+ if (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()
+ elseif (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 symlink \"$ENV{DESTDIR}${file}\"")
+ endif()
+ else()
+ message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ endif()
+endforeach()
+