← Commit list

88d85916f2

Viktor Szakats
Viktor Szakats
2026-06-27
SUCCESS Duration: 182s

Subject

cmake: minor improvements to `cmake_uninstall.in.cmake`

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMake/cmake_uninstall.in.cmake+10 -6
@@ -26,18 +26,22 @@ if(NOT EXISTS "${_manifest}")
message(FATAL_ERROR "Cannot find install manifest: ${_manifest}")
endif()
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
+set(_destdir "$ENV{DESTDIR}")
+if(NOT _destdir STREQUAL "")
+ message(STATUS "DESTDIR environment: ${_destdir}")
endif()
-message(${CMAKE_INSTALL_PREFIX})
file(READ "${_manifest}" _files)
string(REGEX REPLACE "\n" ";" _files "${_files}")
foreach(_file IN LISTS _files)
- set(_target "$ENV{DESTDIR}${_file}")
- message(STATUS "Uninstalling ${_target}")
+ set(_target "${_destdir}${_file}")
if(IS_SYMLINK "${_target}" OR EXISTS "${_target}")
- execute_process(COMMAND "@CMAKE_COMMAND@" -E rm -f -- "${_target}")
+ file(REMOVE "${_target}")
+ if(IS_SYMLINK "${_target}" OR EXISTS "${_target}")
+ message(STATUS "Failed to delete: ${_target}")
+ else()
+ message(STATUS "Uninstalled: ${_target}")
+ endif()
else()
message(STATUS "File does not exist: ${_target}")
endif()
CMakeLists.txt+1 -3
@@ -2452,9 +2452,7 @@ if(NOT CURL_DISABLE_INSTALL)
DESTINATION ${_install_cmake_dir})
if(NOT TARGET curl_uninstall)
- # Consumed variables:
- # CMAKE_COMMAND
- # CMAKE_INSTALL_PREFIX
+ # Consumed variable:
# PROJECT_BINARY_DIR
configure_file(
"${PROJECT_SOURCE_DIR}/CMake/cmake_uninstall.in.cmake"