From d25532dd9b7bef8f5c88193f2c04c026942243be Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:13:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uninstall.cmake | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/uninstall.cmake b/uninstall.cmake index d3ac07e42..7767e5118 100644 --- a/uninstall.cmake +++ b/uninstall.cmake @@ -20,14 +20,22 @@ # macro(_SETUP_PROJECT_UNINSTALL) # Detect if the .catkin was created previously - 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() + 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() # FIXME: it is utterly stupid to rely on the install manifest. Can't we just # remember what we install ?! configure_file(