Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[catkin] Do not remove catkin file, breaks robostack environment
Browse files Browse the repository at this point in the history
cmastalli committed Nov 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1f6b9eb commit ba21c1c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -18,16 +18,25 @@ IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
RETURN()
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")

IF(NOT DEFINED PACKAGE_CREATES_DOT_CATKIN OR NOT "${PACKAGE_PREVIOUS_INSTALL_PREFIX}" EQUAL "${CMAKE_INSTALL_PREFIX}")
SET(PACKAGE_PREVIOUS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "Cache install prefix given to the package")
IF(EXISTS "${CMAKE_INSTALL_PREFIX}/.catkin")
SET(PACKAGE_CREATES_DOT_CATKIN FALSE CACHE INTERNAL "")
ELSE()
SET(PACKAGE_CREATES_DOT_CATKIN TRUE CACHE INTERNAL "")
ENDIF()
ENDIF()

MESSAGE(STATUS "catkin path: @CMAKE_INSTALL_PREFIX@/.catkin")
IF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin")
IF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin" AND NOT PACKAGE_CREATES_DOT_CATKIN)
MESSAGE(STATUS "Try to remove @CMAKE_INSTALL_PREFIX@/.catkin")
EXECUTE_PROCESS(
COMMAND @CMAKE_COMMAND@ -E remove "@CMAKE_INSTALL_PREFIX@/.catkin"
RESULT_VARIABLE rm_resval
OUTPUT_VARIABLE rm_out
ERROR_VARIABLE rm_err
)
ENDIF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin")
ENDIF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin" AND NOT PACKAGE_CREATES_DOT_CATKIN)

IF(EXISTS "@CMAKE_CURRRENT_BINARY_DIR@/install_manifest.txt")
return()

0 comments on commit ba21c1c

Please sign in to comment.