Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Okey, I found it. I had to add the following lines:

add_dependencies(lib_name
    ros_johnny5_generate_messages_cpp
)

for each add_library() in ros_johnny5 CMakeFile.txt too, because I use messages of project in library too.

Completely, it's look like this:

add_library(your_lib
    src1.cpp
    src2.cpp
    ...
)
add_dependencies(your_lib
    your_project_generate_messages_cpp
)