I’m new to the JUCE framework and I’m trying to set up a modern, lightweight development environment on my macOS machine. Due to limited disk space, I’m trying to avoid using the full Xcode IDE and would love to build my projects directly with VS Code and CMake.
I’ve noticed that the latest versions of JUCE have excellent CMake support, and I’ve been looking at the CMakeLists.txt template provided in the examples/CMake/AudioPlugin directory in the source code. This looks very promising!
However, as a beginner to this specific workflow, I’m a bit lost on the concrete steps to tie everything together. I’ve searched for tutorials, but haven’t found one that clearly covers this specific combination from start to finish (JUCE + CMake + VS Code on macOS).
Could anyone here share some guidance or point me to a good resource? My main questions are:
Starting a New Project: What is the recommended way to start a new project using the CMake template? Should I just copy the example folder and modify it?
Directory Structure: Is there a best-practice directory structure for a project where the JUCE source code is kept separate (e.g., as a submodule or in a parallel folder)?
VS Code Configuration: Are there any specific settings or “gotchas” when configuring the CMake Tools and C/C++ extensions in VS Code for a JUCE project on macOS? For example, setting up IntelliSense correctly or configuring build targets (Standalone, VST3, AU).
Building and Running: What’s the smoothest way within VS Code to compile all formats and then run/debug the Standalone version?
I’m really excited to dive into JUCE development, and any advice on getting this workflow up and running would be incredibly helpful.
Project Setup: Use the Pamplejuce template for audio plugin projects. It’s a modern project template specifically designed for building JUCE audio plugins with CMake that comes with proper directory structure and JUCE as a git submodule. It should get you started quickly with your new project.
VS Code Configuration: Install the CMake Tools and C/C++ extensions. Key settings:
Set cmake.configureOnOpen to true
Choose “Clang” as your kit when prompted
IntelliSense should auto-configure once CMake generates
Building/Running: Create a CMakePresets.json in your project root - they make switching between builds much smoother. VS Code will automatically detect it. This file lets you define build configurations (Debug/Release) and target different plugin formats.
@bencekovacs set up looks correct to me – just want to point out that if you do not install Xcode (AppleClang), you will have to install clang (or another compiler of your choice), which probably takes just as much space on disk
You can also install the clangd plugin for VSCode which does a great job of understanding your project (jump to definiton, show call heirarchy etc). Just need to make sure that you set up CMake to emit a compiler_commands.jsonfile