CMake JUCE Module Inclusion Change?

Did something change recently (within the last few weeks) about which sources get included when adding modules with CMake? It looks like now all the cpp files that start with my module name are getting added as source files, not just the main module cpp file.

My module CMakeLists.txt file looks like this:

juce_add_modules(
    INSTALL_PATH "include/JUCE-${JUCE_VERSION}/modules"
    ALIAS_NAMESPACE tracktion
    tracktion_engine
    tracktion_graph)

And it looks like there is some level of recursion going on as the following highlighted files are being added as sources:


Is this expected and do I need to just change the tracktion_graph/tracktion_graph to a different name?
Or was this inadvertently added recently?

I think it’s a bug and it comes from

@reuk @eyalamir FYI

Ah yes thanks. Looks like that GLOB_RECURSE might be the root of the problem?

I did try to bisect JUCE to find the introduction of the problem but I’d just updated all the now deprecated XML macros so it would have been a bit more of a hassle.

should fix the issue.

Thanks @reuk!

1 Like

Sorry about that, Dave.
I’ve been submitting a few PR’s to help make the modules in CMake generated projects look better in XCode and Visual Studio, and closer to how the Projucer used to organize them.

But I might have missed some of the module configurations as I’m only testing with the built in JUCE modules and my own. Good thing @McMartin and @reuk figured out the issue and fixed it!

Thanks that seems to have done the trick!