Skip to content

Commit

Permalink
Backup and restore the CMAKE_MODULE_PATH.
Browse files Browse the repository at this point in the history
So we don't permanently manipulate it.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Dec 1, 2023
1 parent 0e61d1f commit 23ea44e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/urdfdom-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if (@PKG_NAME@_CONFIG_INCLUDED)
endif()
set(@PKG_NAME@_CONFIG_INCLUDED TRUE)

set(CMAKE_MODULE_PATH_BACKUP_URDFDOM ${CMAKE_MODULE_PATH})
list(APPEND CMAKE_MODULE_PATH "${@PROJECT_NAME@_DIR}")

set(@PKG_NAME@_INCLUDE_DIRS "${@PROJECT_NAME@_DIR}/@RELATIVE_PATH_CMAKE_DIR_TO_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@")
Expand Down Expand Up @@ -46,3 +47,5 @@ endforeach()
foreach(exp @PKG_EXPORTS@)
include(${@PROJECT_NAME@_DIR}/${exp}Export.cmake)
endforeach()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_BACKUP_URDFDOM})

0 comments on commit 23ea44e

Please sign in to comment.