I have 2 projects L and A in CMake, say L is a library and A an application depending on L.
The folders hierarchy looks like:
- A
- CMakeLists.txt + headers + src
- L
- CMakeLists.txt + headers + src
- subL
- headers + src files
Now, in terms of include directories I understand I need to specify subL in L/CMakeLists.txt/include_directories(), so the other files within L can reference the include files simply with a #include "mySubLHeaderFile.h" or #include < mySubLHeaderFile.h>.
Now if I want to reference a header file from subL within a file from the A project and be able to reference this subL file simply with a #include "mySubLHeaderFile.h" or #include < mySubLHeaderFile.h>, I have noticed I need to re-specify subL in A/CMakeLists.txt/include_directories(). Is this a normal behavior? Aren't the include_directories() inherited from the depended project?
------ EDIT 1 -------
Note that I have a top level CMakeLists.txt above A and L.