Skip to content

Commit

Permalink
[catkin] Do not remove catkin file, breaks robostack environment
Browse files Browse the repository at this point in the history
  • Loading branch information
cmastalli committed Nov 10, 2023
1 parent eb5956a commit 5ca6421
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
Expand Up @@ -19,16 +19,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()
Expand Down

0 comments on commit 5ca6421

Please sign in to comment.