Robotics StackExchange | Archived questions

importing header files using target_link_library

I have one package and cmakeList.txt inside that package makes addlibrary(X y.cpp z.cpp). y.cpp is including A.h. I have another package B in which source files are using A.h from first package. Now one way to use these header files is do catkinmake() install() and add package dependency. But if I dont want to include package dependency and instead targetlinklibrary() to import header files from X. can i just do adddependency(currettarget X) without adding any package dependency? Do i still need catkin_make() and install() in first package?

Asked by debonair on 2018-09-18 16:42:02 UTC

Comments

target_link_libraries(..) links libraries, it doesn't do anything with headers.

Can you clarify what is your actual question?

Asked by gvdhoorn on 2018-09-19 01:31:25 UTC

Answers