Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <vsoftco@gmail.com>
  • Loading branch information
vsoftco committed May 1, 2024
1 parent 5c3149e commit 61b93cc
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions cmake/staq_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()

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}")
execute_process(
COMMAND "@CMAKE_COMMAND@" -E rm -f "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval)
message(STATUS "ENVDESTDIR: $ENV{DESTDIR}")
message(STATUS "file: ${file}")
message(STATUS "rm_out: ${rm_out}")
message(STATUS "rm_retval: ${rm_retval}")
if(${rm_retval})
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else()
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()

if(NOT "@MSVC@")
message(STATUS "Removing @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@")
if("@INSTALL_SOURCES@")
message(STATUS "Removing @STAQ_INSTALL_DIR@")
endif()
else()
message(STATUS "Removing @CMAKE_INSTALL_PREFIX@")
endif()
if(POLICY CMP0012)
cmake_policy(SET CMP0012 NEW)
endif()

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 ${file}")
if(IS_SYMLINK "${file}" OR EXISTS "${file}")
execute_process(
COMMAND "@CMAKE_COMMAND@" -E rm -f "${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval)
message(STATUS "ENVDESTDIR: $ENV{DESTDIR}")
message(STATUS "file: ${file}")
message(STATUS "rm_out: ${rm_out}")
message(STATUS "rm_retval: ${rm_retval}")
if(${rm_retval})
message(FATAL_ERROR "Problem when removing ${file}")
endif()
else()
message(STATUS "File ${file} does not exist.")
endif()
endforeach()

if(NOT "@MSVC@")
message(STATUS "Removing @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@")
if("@INSTALL_SOURCES@")
message(STATUS "Removing @STAQ_INSTALL_DIR@")
endif()
else()
message(STATUS "Removing @CMAKE_INSTALL_PREFIX@")
endif()

0 comments on commit 61b93cc

Please sign in to comment.