How to Use GSL in ROS2

step 1

install gsl

1
2
sudo apt install libgsl-dev

step 2

add or modify the CMakeList.tst as this

1
2
3
4
find_package( PkgConfig REQUIRED)
pkg_check_modules( gsl REQUIRED gsl )
add_executable( my_exec src/my_source.cpp )
target_link_libraries( my_exec ${gsl_LIBRARIES} )