CapsCollective / raylib-cpp-starter

A portable, automated template for raylib projects with C++ bindings
Other
68 stars 17 forks source link

How I add an extra folder of includes? #7

Closed marioxe301 closed 3 years ago

marioxe301 commented 3 years ago

If I don't what to create extra headers in "include" folder, and I create a new folder where I storage all my custom .hpp, how do I specify to add that folder for .hpp files?

jonjondev commented 3 years ago

Hi @marioxe301, you can quite easily avoid using an includes directory in the project actually! The build system should out of the box support placing headers anywhere really - even directly next to your .cpp files under the src directory (see here for an example project structure like this).

As the build system does not specify a directory for project headers, it's up the source files to point to their relevant headers. It may be of use to have a look at the project's Makefile to get a better understanding of how the build system works and can be leveraged to your specific needs - we've even put together a pretty meticulous explanation of how it works from top to bottom which we would invite you to read. Happy hacking!