How to modify config.make to include external directory

I’m working on a project where I’m building a library of OF-related .cpp and .h files which I’d like to be able to incorporate into any project I make with the projectGenerator, similar to a ofxAddon. However, I would like to be able to customize the internal structure with subdirectories. To my understanding, this means that I cannot just add ‘ofxMyLibrary’ to the addon.make file and expect it to work. Plus, I want to have this directory in a completely different location on my computer, right now it’s located in a folder in the OF root location. I’m completey confused as to how the makefile works… Since they are uncompiled c++ files, I’m assuming I have to define the PROJECT_CFLAGS macro inside the config.make file. I have tried different iterations of this:

PROJECT_CFLAGS = -I../../../projectFolder

but nothing seems to work and I keep getting the same ‘undefined reference’ error whenever I try to make an instance of a class that I have defined in that project folder. The internal structure of the project has a main header file that links to all the other files inside subdirectories (pretty much the same as the ofMain.h file). To include a library like that into config.make, how would I go about doing that? My apologies if the question is a little incoherent, but any help would be greatly appreciated!

in 0.9 or the current nightly builds you can add addons from anywhere, just add the relative path to the addon from the project to addons.make like:


that will add ofxGui from the addons folder in the OF install and ofxLocalAddon from a folder one level above the project.

another way is to add in config.make


which will add recursively all the code in that folder but it’s sometimes problematic and doesn’t parse includes, libraries… as well as including an addon

Modifying the PROJECT_EXTERNAL_SOURCE_PATHS macro worked! Thank you! Although now when I use the code the screen completely glitches. But that’s another problem, I’ll try to figure out why that happens…