BLT-Test/cmake-build-relwithdebinfo/BLT-Graphics/libraries/glfw/cmake_uninstall.cmake

30 lines
1.4 KiB
CMake
Raw Normal View History

2023-07-29 18:58:42 -04:00
2023-09-10 13:25:57 -04:00
if (NOT EXISTS "/home/brett/Documents/code/c++/BLT_dev/BLT-Test/cmake-build-relwithdebinfo/BLT-Graphics/libraries/glfw/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"/home/brett/Documents/code/c++/BLT_dev/BLT-Test/cmake-build-relwithdebinfo/BLT-Graphics/libraries/glfw/install_manifest.txt\"")
2023-07-29 18:58:42 -04:00
endif()
2023-09-10 13:25:57 -04:00
file(READ "/home/brett/Documents/code/c++/BLT_dev/BLT-Test/cmake-build-relwithdebinfo/BLT-Graphics/libraries/glfw/install_manifest.txt" files)
2023-07-29 18:58:42 -04:00
string(REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
2023-09-10 13:25:57 -04:00
exec_program("/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/x64/bin/cmake" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
2023-07-29 18:58:42 -04:00
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}")
2023-09-10 13:25:57 -04:00
EXEC_PROGRAM("/opt/netbrains/clion/clion-2022.1.3/bin/cmake/linux/x64/bin/cmake" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
2023-07-29 18:58:42 -04:00
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()