#Link interface in inferface

2 messages · Page 1 of 1 (latest)

exotic juniper
#

Hi, I have the following c++ library/project setup:

  1. LibA which is an Interface (because of templates)
    2 LibB which is also an Interface.

When I try to add targetA (Interface) of LibA to the target "targetB" (interface) in LibB with target_link_libraries(targetB INTERFACE libA) then the the includes of the LibA interface headers is not found.

But when LibB targetB is not an Interface (has cpp source files) and i do target_link_libraries(targetB libA) then everything works fine, I can include the headers of targetA.

How do I link the intreface targetA to the inteface targetB?

Please let me know if you require a minimal code example, then i will try to minimize my source code!

Thank you!

restive pumiceBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.