From 2bbf92ad5ae7708bf18ac7ef333e9a979d8d1bde Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Thu, 16 Nov 2023 21:12:27 -0300 Subject: Working so hard like a soldier Can't afford a thing on TV --- raylib/cmake/LibraryConfigurations.cmake | 2 ++ raylib/cmake/Uninstall.cmake | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 raylib/cmake/Uninstall.cmake (limited to 'raylib/cmake') diff --git a/raylib/cmake/LibraryConfigurations.cmake b/raylib/cmake/LibraryConfigurations.cmake index 1debfeb..d4bf45a 100644 --- a/raylib/cmake/LibraryConfigurations.cmake +++ b/raylib/cmake/LibraryConfigurations.cmake @@ -105,6 +105,8 @@ if (NOT ${OPENGL_VERSION} MATCHES "OFF") set(GRAPHICS "GRAPHICS_API_OPENGL_11") elseif (${OPENGL_VERSION} MATCHES "ES 2.0") set(GRAPHICS "GRAPHICS_API_OPENGL_ES2") + elseif (${OPENGL_VERSION} MATCHES "ES 3.0") + set(GRAPHICS "GRAPHICS_API_OPENGL_ES3") endif () if ("${SUGGESTED_GRAPHICS}" AND NOT "${SUGGESTED_GRAPHICS}" STREQUAL "${GRAPHICS}") message(WARNING "You are overriding the suggested GRAPHICS=${SUGGESTED_GRAPHICS} with ${GRAPHICS}! This may fail") diff --git a/raylib/cmake/Uninstall.cmake b/raylib/cmake/Uninstall.cmake new file mode 100644 index 0000000..c2d34d4 --- /dev/null +++ b/raylib/cmake/Uninstall.cmake @@ -0,0 +1,21 @@ +if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") +endif() + +file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) +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() + else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") + message(STATUS "File $ENV{DESTDIR}${file} does not exist.") + endif() +endforeach() -- cgit v1.2.3