Skip to content

Commit

Permalink
Avoid target collision if gtsam used as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Feb 5, 2021
1 parent b6bd656 commit ffc4e59
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/HandleUninstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@ configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
if (NOT TARGET uninstall) # avoid duplicating this target
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
else()
add_custom_target(uninstall_gtsam
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
add_dependencies(uninstall uninstall_gtsam)
endif()

0 comments on commit ffc4e59

Please sign in to comment.