facontidavide / rosx_introspection

Deserialize any ROS message, without compilation time information.
Mozilla Public License 2.0
43 stars 5 forks source link

Additional package required in CMakeLists.txt #2

Closed bl0wfi-sh closed 1 week ago

bl0wfi-sh commented 11 months ago

Hi!

I could be doing something wrong on my end, but it seems like the CMakeLists.txt file needs slight modifications?

I noticed that after a fresh pull and creation of a 'build' directory, and subsequent execution of 'cmake ../ && make -j8 rosx_introspection' I get an error where the compiler can't find "rosbag2_cpp" files.

I had to modify the following lines to the CMakeLists.txt under the "Install the package" section.

elseif( COMPILING_WITH_AMENT )

    find_package(ament_cmake REQUIRED)
    find_package(rclcpp REQUIRED)                
    find_package(rosbag2_cpp REQUIRED)                   # <-- Added this packaged.

    ament_target_dependencies(rosx_introspection rclcpp rosbag2_cpp)              # <-- here too...