robotology / gz-sim-yarp-plugins

YARP plugins for Modern Gazebo (gz-sim).
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

Remove relative includes by using `target_include_directories` and `target_link_libraries` #114

Closed xela-95 closed 3 months ago

xela-95 commented 3 months ago

A better way to handle includes in c++ is given by defining target_include_directories and target_link_libraries in each target's CMakeLists and then by including the necessary headers with <> brackets.

As an example, see https://github.com/robotology/gz-sim-yarp-plugins/blob/5d451a22e2b1a2e325eb17011a0be75cc466d323/plugins/controlboard