importing header files using target_link_library
I have one package and cmakeList.txt inside that package makes add_library(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 catkin_make() install() and add package dependency. But if I dont want to include package dependency and instead target_link_library() to import header files from X. can i just do add_dependency(curret_target X) without adding any package dependency? Do i still need catkin_make() and install() in first package?
target_link_libraries(..)
links libraries, it doesn't do anything with headers.Can you clarify what is your actual question?