I'm using cmake to compile a project with the following structure:
Root
I have CMakeLists on each LibX, each src and Root folders.
My project is compiling and working as expected. But I would like to include headers as: include "{LibX}/{header}.h" instead of just "{header}.h" or instead of putting the absolute/relative path to the header.
Since I'm setting all the include directories in CMakeLists, I can simply include a header with its name, but that's not really the best solution.
For example, my main.cpp depends on LibA and LibB, and LibA depends on LibB, which is a math library. It would be good to know from which library I'm including a header every time.
Thank you
Root/LibA/inc/
LibA
/MyHeaderFileFromA.h
#include <LibA/MyHeaderFileFromA.h>
there you go