how to use Boost.Asio in cmakelist
hello,
I want to use serial_port in ROS, and it belong to Boost.Asio. When I add asio in cmakelist like this
find_package(Boost REQUIRED system thread asio)
error happend like this
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: /usr/include
Could not find the following Boost libraries:
boost_asio
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
What should I write in cmakelist if I want to use asio?
Thanks.
Asked by lizhecome on 2016-09-25 08:13:42 UTC
Answers
Try removing asio
from the list so that you end up with:
find_package(Boost REQUIRED COMPONENTS thread system)
That works for me in the os5000 package.
Asked by Thomas D on 2016-09-25 09:05:41 UTC
Comments
+1 and here's another example package: xv_11_laser_driver
Asked by spmaniato on 2016-09-25 10:28:47 UTC
Comments