-
Notifications
You must be signed in to change notification settings - Fork 788
/
RTABMapConfig.cmake.in
102 lines (87 loc) · 3.16 KB
/
RTABMapConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
include(CMakeFindDependencyMacro)
# Mandatory dependencies
find_dependency(OpenCV COMPONENTS core calib3d imgproc highgui stitching photo video OPTIONAL_COMPONENTS aruco objdetect xfeatures2d nonfree gpu cudafeatures2d)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_guiTargets.cmake")
find_dependency(PCL 1.7 COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation visualization)
if(@CONF_QT_VERSION@ EQUAL 6)
find_dependency(Qt6 COMPONENTS Widgets Core Gui OpenGL)
elseif(@CONF_QT_VERSION@ EQUAL 5)
find_dependency(Qt5 COMPONENTS Widgets Core Gui OpenGL)
else() # Qt4
find_dependency(Qt4 COMPONENTS QtCore QtGui)
endif()
set(RTABMap_QT_VERSION @CONF_QT_VERSION@)
ELSE()
find_dependency(PCL 1.7 COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation)
ENDIF()
set(RTABMap_DEFINITIONS ${PCL_DEFINITIONS})
add_definitions(${RTABMap_DEFINITIONS}) # To include -march=native if set
# Optional dependencies
IF(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
ENDIF()
IF(@CONF_WITH_REALSENSE2@)
IF(WIN32)
find_dependency(RealSense2)
ELSE()
find_dependency(realsense2)
ENDIF()
ENDIF()
IF(@CONF_WITH_K4A@)
IF(WIN32)
find_dependency(K4A)
ELSE()
find_dependency(k4a)
find_dependency(k4arecord)
ENDIF()
ENDIF()
IF(@CONF_WITH_DEPTH_AI@)
find_dependency(depthai 2.24)
ENDIF()
IF(@CONF_WITH_XVSDK@)
find_dependency(xvsdk)
ENDIF()
IF(@CONF_WITH_OCTOMAP@)
find_dependency(octomap)
ENDIF()
IF(@CONF_WITH_PYTHON@)
find_dependency(Python3 COMPONENTS Interpreter Development NumPy)
ENDIF()
# Provide those for backward compatibilities (e.g., catkin requires them to propagate dependencies)
set(RTABMap_INCLUDE_DIRS "")
set(RTABMap_LIBRARIES "")
set(RTABMap_TARGETS "")
set(_RTABMap_supported_components utilite core gui)
foreach(_comp ${_RTABMap_supported_components})
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
set(RTABMap_${_comp}_FOUND True)
set(RTABMap_TARGETS
${RTABMap_TARGETS}
rtabmap::${_comp})
get_target_property(RTABMap_${_comp}_INCLUDE_DIRS rtabmap::${_comp} INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(RTABMap_${_comp}_LIBRARIES rtabmap::${_comp} INTERFACE_LINK_LIBRARIES)
set(RTABMap_INCLUDE_DIRS
${RTABMap_INCLUDE_DIRS}
${RTABMap_${_comp}_INCLUDE_DIRS})
set(RTABMap_LIBRARIES
${RTABMap_LIBRARIES}
rtabmap::${_comp})
if(RTABMap_${_comp}_LIBRARIES)
set(RTABMap_LIBRARIES
${RTABMap_LIBRARIES}
${RTABMap_${_comp}_LIBRARIES})
endif()
else()
set(RTABMap_${_comp}_FOUND False)
endif()
endforeach()
include("${CMAKE_CURRENT_LIST_DIR}/RTABMapTargets.cmake")
foreach(_comp ${RTABMap_FIND_COMPONENTS})
if (NOT RTABMap_${_comp}_FOUND)
if(${RTABMap_FIND_REQUIRED_${_comp}})
set(RTABMap_FOUND False)
set(RTABMap_NOT_FOUND_MESSAGE "Unsupported or not found required component: ${_comp}")
endif()
endif()
endforeach()