Custom module: exclude directory from module?

Hi everybody,
is there a way to exclude source files inside a subdirectory of a module to be added to the project?

I created a module and want to supply a few example jucer projects inside the path. The problem is, that all sources are dragged into the project, so everyone using the module will have additional Main.cpp files.
It shall look like that (the actual module on github):


I would love to keep it like that, so it can be added as git submodule inside JUCE/modules/, otherwise people need to get the module and the examples separately.

Thanks for hints

Are you completely set on putting it in the JUCE/modules/ directory? If you were willing to put it elsewhere then you could have a structure like


then just add JUCE_module in the Projucer. I think most JUCE users have JUCE as a submodule in their projects, and they could do the same with your module (on the same level as JUCE).

Thanks @t0m, that’s exactly what I ended up now.
I wanted to have it as self contained as possible, but this is a good compromise. The only drawback is, that people will have to checkout a single folder (JUCE_module) from inside the git repo, but that’s actually no big deal.

Just to be clear - there’s currently no way of excluding source files in a module on all platforms. I’ll have a think and see if there’s a nice way of doing this.


How does everyone go about writing/debugging their modules? XCode seems to be really finicky about autoCompletion if the source files you’re editing aren’t in the XCode project hierarchy, which is exactly what happens when you’re using modules. It’s a real bummer for trying to develop/debug new modules.

Actually that made no difference for me. I always have at least 3 own modules in every project and no problems with that.
But I also realise, that XCode (especially since I upgraded from 10.10 to 10.12 (i.e. from XCode 7.x to 8.x) it became often unstable, slow progressbar “Processing source files…” or just providing no autocompletion or only after several seconds. But that happend to me in module sources as well as in normal source files.

There is a setting in Projucer “Make module files browsable in projects”, which I believe includes the module sources in the context for autocomplete and syntax highlight as well. I left it as default (i.e. ticked) and as I said, it works most of the times.

But yes, I also feel unsatisfied when the solution is “restart your software”…

@jules and other Roli devs, how do you develop/debug modules? (With regard to project folder hierarchy)