mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-12 14:30:19 +08:00
Config: added explicit compoments of dependencies
This commit is contained in:
+18
-12
@@ -1,7 +1,23 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(OpenCV)
|
||||
find_dependency(PCL 1.7)
|
||||
|
||||
# Mandatory dependencies
|
||||
find_package(OpenCV REQUIRED QUIET COMPONENTS core calib3d imgproc highgui stitching photo video OPTIONAL_COMPONENTS aruco xfeatures2d nonfree gpu cudafeatures2d)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_guiTargets.cmake")
|
||||
FIND_PACKAGE(PCL 1.7 REQUIRED QUIET COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation visualization)
|
||||
|
||||
if(@CONF_QT_VERSION@ EQUAL 5)
|
||||
find_dependency(Qt5 COMPONENTS Widgets Core Gui PrintSupport OpenGL OPTIONAL_COMPONENTS Svg)
|
||||
else() # Qt4
|
||||
find_dependency(Qt4 COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS QtSvg)
|
||||
endif()
|
||||
set(RTABMap_QT_VERSION @CONF_QT_VERSION@)
|
||||
ELSE()
|
||||
FIND_PACKAGE(PCL 1.7 REQUIRED QUIET COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation)
|
||||
ENDIF()
|
||||
set(RTABMap_DEFINITIONS ${PCL_DEFINITIONS})
|
||||
|
||||
# Optional dependencies
|
||||
IF(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
|
||||
ENDIF()
|
||||
@@ -27,8 +43,6 @@ IF(@CONF_WITH_OCTOMAP@)
|
||||
find_dependency(octomap)
|
||||
ENDIF()
|
||||
|
||||
set(RTABMap_DEFINITIONS ${PCL_DEFINITIONS})
|
||||
|
||||
# Provide those for backward compatibilities (e.g., catkin requires them to propagate dependencies)
|
||||
set(RTABMap_INCLUDE_DIRS "")
|
||||
set(RTABMap_LIBRARIES "")
|
||||
@@ -37,14 +51,6 @@ set(_RTABMap_supported_components utilite core gui)
|
||||
|
||||
foreach(_comp ${_RTABMap_supported_components})
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
|
||||
if (${_comp} STREQUAL "gui")
|
||||
if(@CONF_QT_VERSION@ EQUAL 5)
|
||||
find_dependency(Qt5 COMPONENTS Widgets Core Gui PrintSupport OpenGL OPTIONAL_COMPONENTS Svg)
|
||||
else() # Qt4
|
||||
find_dependency(Qt4 COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS QtSvg)
|
||||
endif()
|
||||
set(RTABMap_QT_VERSION @CONF_QT_VERSION@)
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
|
||||
set(RTABMap_${_comp}_FOUND True)
|
||||
get_target_property(RTABMap_${_comp}_INCLUDE_DIRS rtabmap_${_comp} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
Reference in New Issue
Block a user