ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I want to answer my own question, to clarify which way I found and what is the proper as I consider.
Basically, you have to add folder with header files and the library itself. You can do it with find_package, or manually.
The header files you have to include in "include_libraries" like I did:
include_directories(
${catkin_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5WebSockets_INCLUDE_DIRS} /usr/include )
And the library itself, you can add with "target_link_libraries", like this:
add_executable(driver src/driver_node.cpp) target_link_libraries(driver ${catkin_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} /usr/lib/aarch64-linux-gnu/libserial.so)
2 | No.2 Revision |
I want to answer my own question, to clarify which way I found and what is the proper as I consider.
Basically, you have to add folder with header files and the library itself. You can do it with find_package, or manually.
The header files you have to include in "include_libraries" like I did:
include_directories(
include_directories( ${catkin_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5WebSockets_INCLUDE_DIRS} /usr/include )
And the library itself, you can add with "target_link_libraries", like this:
add_executable(driver src/driver_node.cpp) target_link_libraries(driver ${catkin_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} /usr/lib/aarch64-linux-gnu/libserial.so)