Generating IDE Projects using CMake

Hi ,
I’ld like to create JUCE audio plugin projects with CMake instead of Projucer for various reasons. While it takes a little longer, I think it’s the more flexible approach when it comes to build systems etc.

I have a few questions on that and I’d appreciate any experience if anybody went through the trouble already. (Yes, I know of the CMake + Juce Projects on GitHub.)

One question I have is if the platform-specific suffix changed. In the module format txt it states that the suffix _Win or _Mac is used but all source files I could find used a “juce_win32” or “juce_mac” prefix instead. Is checking for these a valid method to remove / add platform specific files to the compilation list?

I’m sure I’ll have other questions later.

Hi @WilliamR,

Did you have a look at I am the author and I will be very happy to help you using it.

Where did you find that? Since JUCE 4.2.0, the platform-specific suffixes are _OSX, _Windows, _Linux, _Android, and _iOS (see These suffixes never changed. The modules that you can find in simply don’t have any files that use them.

When you are building a JUCE module, you are not supposed to compile the files that are in sub-folders inside the module folder. For instance, when you want to compile juce_core, you should only compile for macOS and iOS, or juce_core.cpp for the other platforms.

I hope this helps.


yes, I saw your project but decided to go a slightly different route. :slight_smile: (But mainly because the project I’m working on is a case of “learning by doing”, I’ll also try to use juce only for UI and to adapt to all those plugin APIs)
That explains why there are cpp files included everywhere and It also makes the whole undertaking much easier. Then the irrelevant platform-specific source files are simply not included.
I just read that .mm and .cpp files are exclusive, meaning .mm-files are to be used instead of .cpp files on mac.

EDIT: continue reading the last sentence of a post sometimes helps. (You already mentioned the .mm and .cpp thing)