[FR] Projucer basic New CMake Generator

I know this sounds odd :slight_smile:

JUCE already got a separate CMake and that’s great.
But Projucer has very fast “New Project” generator that’s mostly some file templates.

As I see it,
It’s feels pretty low-hanging to make existing Projucer

And have a toggle for Exporters/CMake so you could simply get a folder with same generated files (Main.cpp, PluginEditor.cpp/h) and initial CMake setup. (with templates, I already need to do some renaming or write scripts to make a new CMake project…)

It would be amazing! (voted)

Although it has to be said, it would be a one way street. You wouldn’t be able to keep edits to the cmake. Well, maybe with some clever private include calls in the CMakeLists.txt

You’re absolutely right. But the rationale is:

  • For beginners/JUCE first-comers, as stated by JUCE team many times, Projucer is the fastest way to get up and running. Any “newbie” that will export to CMake (by mistake), won’t be able to do much (with the exception of VSCode that might be able to hint some workflow :slight_smile: )

  • For those embracing CMake, many times now, I manually copy some blueprint project and modify it manually. There are some nice usable templates such as @eyalamir 's templates. But in all scenarios, I need to manually rename many things to get to the initial state.

  • Generated project, even in Projucer won’t ensure migration across JUCE breaking changes

So… for the biggest CMake audience, this feature (I’ll dare say low-hanging) of one-way JUCE CMake generator. is good enough.

But indeed, it’s worth stating if it’s not clear enough that this is one way.

1 Like

Are we talking about a CMAKE exporter? I would use this.
I’m interested in moving to cmake for some existing projects, but right now it’s just a bunch of work we don’t need to do.

I get the feeling that JUCE would rather we all move to CMAKE and leave the projucer behind? Is that correct?

I’m afraid not.

That’s a complex thing that could easily break. The suggested feature is similar to what you end up creating a new project with Projucer - An empty “skeleton” project.

I’m interested in moving to cmake for some existing projects, but right now it’s just a bunch of work we don’t need to do.

Migrating to CMake requires be acquainted with it first. If you got some grasp of CMake, the migration isn’t that hard even for existing projects.

Hmm, I thought that would be the goal too.

In that case FRUT might still be the best bet. This allows to migrate a jucer project to cmake (though I haven’t used it).

I thought this FR would avoid that extra step.