原文链接:见ROS官方github
谢谢作者!
A common repository for CMake Modules which are not distributed with CMake but are commonly used by ROS packages.
See the CONTRIBUTING.md file in this repository before submitting pull requests for new modules.
This repository has branches for minor releases (0.2-devel
, 0.3-devel
, 0.4-devel
, etc…) and they map to specific ROS distributions like so:
0.2-devel
:
0.3-devel
:
0.4-devel
:
0.5-devel
:
This mapping will be kept up-to-date in the README.md
on the default branch.
In the future, new minor releases will increment by the number of ROS distros that are skipped.
For example, if a custom branch is needed for ROS Lunar, then it will be 0.6-devel
and not 0.5-devel
, so that 0.5-devel
maybe used by Kinetic in the future if necessary.
To use the CMake modules provided by this catkin package, you must
on it in your package.xml
, like so:
<package>
<build_depend>cmake_modulesbuild_depend>
package>
Then you must find_package
it in your CMakeLists.txt
along with your other catkin build dependencies:
find_package(catkin REQUIRED COMPONENTS ... cmake_modules ...)
OR by find_package
'ing it directly:
find_package(cmake_modules REQUIRED)
After the above find_package
invocations, the modules provided by cmake_modules
will be available in your CMAKE_MODULE_PATH
to be found. For example you can find TinyXML
by using the following:
find_package(TinyXML REQUIRED)
find_package(Eigen REQUIRED)
find_package(NUMPY REQUIRED)
find_package(TBB REQUIRED)
find_package(TinyXML REQUIRED)
find_package(Xenomai REQUIRED)
find_package(GSL REQUIRED)
find_package(Gflags REQUIRED)