In my application I use a static library with header file foo.h
In my build script I use a gcc -I flag -I./lib.
The foo library is in a directory ./lib/foo. In my main application I include foo.h as
#include "foo/foo.h"
Now I'm refactoring part of my application as a library, bar, that I expect to statically link to another application. This library bar depends on foo. With my current project layout, I could include foo in bar as
#include "foo/foo.h"
However, that would force users of bar to place foo in a directory called foo.
Is the standard thing to do in this case the following?
Add an -I flag to the build script that allows including foo in bar with just
#include "foo.h"
#includefile names (and any hierarchy) should organize logically, not by random implementation details.