mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
CMake Config: added "rtabmap::" prefix for all rtabmap's targets, provide RTABMap_TARGETS list (used by ROS2/ament to detect modern cmake packages).
This commit is contained in:
@@ -761,6 +761,7 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
|
||||
# Add binary that is built from the source file "main.cpp".
|
||||
# The extension is automatically found.
|
||||
ADD_LIBRARY(rtabmap_core ${SRC_FILES} ${RESOURCES_HEADERS})
|
||||
ADD_LIBRARY(rtabmap::core ALIAS rtabmap_core)
|
||||
|
||||
generate_export_header(rtabmap_core
|
||||
DEPRECATED_MACRO_NAME RTABMAP_DEPRECATED)
|
||||
@@ -781,6 +782,7 @@ SET_TARGET_PROPERTIES(
|
||||
PROPERTIES
|
||||
VERSION ${RTABMAP_VERSION}
|
||||
SOVERSION ${RTABMAP_MAJOR_VERSION}.${RTABMAP_MINOR_VERSION}
|
||||
EXPORT_NAME "core"
|
||||
)
|
||||
|
||||
INSTALL(TARGETS rtabmap_core EXPORT rtabmap_coreTargets
|
||||
@@ -806,6 +808,7 @@ install(
|
||||
|
||||
export(EXPORT rtabmap_coreTargets
|
||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/../../${PROJECT_NAME}_coreTargets.cmake"
|
||||
NAMESPACE rtabmap::
|
||||
)
|
||||
|
||||
install(EXPORT rtabmap_coreTargets
|
||||
@@ -813,6 +816,7 @@ install(EXPORT rtabmap_coreTargets
|
||||
${PROJECT_NAME}_coreTargets.cmake
|
||||
DESTINATION
|
||||
${INSTALL_CMAKE_DIR}
|
||||
NAMESPACE rtabmap::
|
||||
COMPONENT
|
||||
devel
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user