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 Dec 5, 2023
1 parent 1f6b9eb commit ea08f24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")

MESSAGE(STATUS "catkin path: @CMAKE_INSTALL_PREFIX@/.catkin")
IF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin")
IF(EXISTS "@CMAKE_INSTALL_PREFIX@/.catkin" AND 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()

IF(EXISTS "@CMAKE_CURRRENT_BINARY_DIR@/install_manifest.txt")
return()
Expand Down
9 changes: 9 additions & 0 deletions uninstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
# Add custom rule to uninstall the package.
#
macro(_SETUP_PROJECT_UNINSTALL)
# Detect if the .catkin was created previously
IF(NOT DEFINED PACKAGE_CREATES_DOT_CATKIN OR NOT "${PACKAGE_PREVIOUS_INSTALL_PREFIX}" STREQUAL "${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()
# FIXME: it is utterly stupid to rely on the install manifest. Can't we just
# remember what we install ?!
configure_file(
Expand Down

0 comments on commit ea08f24

Please sign in to comment.