Avoid projectGenerator to include addon includes subfolders

Hi all,

I’m developing an addon which uses FFmpeg, so I’ve created a libs/FFmpeg folder inside the addon folder. Inside this folder I have a includes folder and inside it I put the folders which contain the FFmpeg headers:


The issue is that, when I try to compile the solution (I’m using Visual Studio but I guess it will be similar with other platforms), I get a lot of errors related with ctime. This is a common issue when working with FFmpeg, because they have a time.h file which conflicts with the system headers. The errors disappear if I remove the includes subfolders from Additional Include Directories in the project configuration (I don’t need them because I’m including the headers with the folder, i.e. #include "libvacodec/ac3_parser.h") and the app runs nicely.

Is it possible to avoid projectGenerator to include these subfolders when the addon is added to the project so users of the addon would not need to care about this issue?

Thanks in advance,

hey, as far as i know you can exclude them in the addon_config.mk.
I cant find this documented somehwere, but if i remember correctly you can exclude sources, includes, libs.

1 Like

Hi Thomas!

Thank you very much, it worked in VS with:

	ADDON_INCLUDES_EXCLUDE = libs/FFmpeg/includes/%

I’ll check if it also works in osx and linux in a couple of weeks.

By the way, I also couldn’t find the documentation of addon_config.mk, this is the best I could find: https://github.com/danomatika/ofxMidi/blob/master/addon_config.mk

have you already checked out the addon_config.mk of ofxAddonTemplate? there are all the different options with comments

1 Like