If you are just starting using JUCE, and want to use CLion, I would recommend using JUCE’s CMake functionality directly. It’s much more powerful.
We will be moving away from the CLion exporter. If you are currently using it for your projects then please don’t worry about it disappearing under your feet - we will keep the current functionality for a while.
We’ll also have a look at the issue in this thread.
Thanks! I’ve switched most of my projects to use native CMake, but there are some existing projects/other people’s projects that use the Projucer, and it would be great to be able to use CLion with those.
P.S. I think many people have asked for a projucer->Native Cmake exporter which would make this transition much easier.
Have you checked out the CMakeLists in examples/CMake? We’ve tried to document those clearly to explain the set-up procedure. There’s also brief getting-started info in JUCE’s main readme, and a detailed API reference in docs/CMake API.md. If there’s anything that could be clearer in any of these docs, please let us know and hopefully we can improve them for everyone.
The folder structure can be quite flexible, although having a top-level folder with inner project folders sounds quite sensible and will keep things tidy as the repo grows.
It looks like the approach in the linked repo is to just run cmake on the top-level folder, and to allow the top-level folder to include the other CMakeLists. If you want to use a single CMakeLists this will work too - just put everything in the top-level CMakeLists instead of splitting it into separate files and calling add_subdirectory.