addons outside OF_ROOT

Hi All,

Since OF has a tight file hierarchie is there any advice into putting addons outside the addons dir. For example I’m trying out the following:

apps/myapp
ofAddons/ofxTwBar
openFrameworks/…etc

On linux I can modify config.make and set the OF_ROOT but for addons I need to modify the Makefile. I have had success adding …/…/ofAddons/ofxTwBar in addons.make instead of just ofxTwBar so that is a nice work around. :slight_smile:

I would like to tell the Makefile to search certain paths like it searched addons. However the addons path is hardcoded. It would be nice to make it a list of paths which by default has an entry to addons.

But I’m probably not the only one who has done this… and I haven’t tried on OSX nor Windows yet. Any recommendations

Rg,

Arnaud

We’ve just experimented with Xcode. In Xcode you can easily change the OF_PATH var which changes all the references. But the addons.make trick I used for Linux doesn’t work. :frowning: Does Xcode use the addons.make file?

It did work just dragging the addon to Xcode however…

We’re testing with the develop branch btw.

Rg,

Arnaud

More Xcode experimenting… in the Project.xcconfig it’s easy to add vars. We’ve found adding the USER_HEADER_SEARCH_PATHS var to the .xcconfig file we can add paths for extra addons.

For example… if we put our addons a directory lower than the OF_PATH we can add those paths as follows:

  
  
//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.  
//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED  
OF_PATH = ../../..  
  
//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE  
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"  
  
OTHER_LDFLAGS = $(OF_CORE_LIBS)   
  
USER_HEADER_SEARCH_PATHS = $(OF_PATH)/../ofAddons/**  
  
HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)  
  

Not sure about the linker yet though…

We’ve tried:

  
USER_HEADER_SEARCH_PATHS = $(OF_PATH)/../ofAddons/*/src $(OF_PATH)/../ofAddons/*/libs/*/include/**  

But Xcode can’t handle wildcards so it seems >:(

Rg,

Arnaud

Hi Sphaero,

on xcode if you don’t mind manually managing them you can just drag the addon folder from any folder on your hard drive onto the xcode project, and xcode will use relative paths to find the addon.

with oF 0.071 the Xcode project template ignores the entries in the Project.xcconfig. there is already an issue about this at https://github.com/openframeworks/openFrameworks/issues/1217 . it would be very helpful if you could add a new comment describing your setup and what you’d like to achieve with it, or if you think this issue doesn’t talk about what you’re trying to do, create a New Issue and enter that in there? we’d like to be able to support working in this way as well!

cheers
Damian