I'm trying to compile roscpp without using the rest of ROS (I only need to subscribe to a node but the one that own that uses an old version of ROS and I couldn't integrate my program with his due to compilation troubles). I downloaded the source code from git (https://github.com/ros/ros_comm) and now I need to compile it, but Cmake throw me errors:
INFOBuilding GTest from source.
TODO: implement add_roslaunch_check() in rostest-extras.cmake.
CMake Error at CMakeLists.txt:8 (catkin_package_xml):
Unknown CMake command "catkin_package_xml".
How can I build it? I'm calling cmake CMakeList.txt, but it doesn't work.
Use this command line to compile your code directly with g++:
Where yourtest.cpp is your c++ file that has some ros code.
If you are using a ros version different of the indigo replace de indigo string by the string of your version.
I suggest you to use rosinstall_generator to compile the package you want, such as roscpp. Here are the steps:
Download the package and its dependencies:
Then compile it:
The compiled packages will be in the folder install_isolated (at the same level as the folder src)