You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using Visual Studio's native CMake support and the Ninja build engine, we can bypass the Projucer and achieve significantly faster compilation times.
1. Prerequisites
Before starting, ensure you have the following installed:
Visual Studio 2022 (Community, Pro, or Enterprise).
C++ CMake tools for Windows (Install this via the Visual Studio Installer under the "Desktop development with C++" workload).
Git for Windows (Optional but recommended for cloning).
2. Download and Prepare Source Code
Open PowerShell and run the following to clone the repo and extract the required Boost libraries:
PowerShell
Navigate to your Documents folder
cd $HOME\Documents\
Clone the repository
git clone https://github.com/damiensellier/CtrlrX
cd .\CtrlrX\
Optional: Switch to a specific maintenance branch
git checkout --track origin/5.6.35-Maintenance
Extract Boost (Required for compilation)
cd .\Source\Misc\boost\
tar -xvf .\boost.zip
cd ..\..\..\
3. Opening the Project in Visual Studio
Instead of looking for a .sln or .jucer file, we will open the folder directly.
Launch Visual Studio 2022.
On the startup screen, select Open a local folder.
Select the CtrlrX root folder (the one containing CMakeLists.txt).
Wait a few seconds. Visual Studio will detect the CMake file and begin "Generating CMake Cache" in the background. You will see progress in the Output window.
4. Configuring Ninja:
By default, Visual Studio might use its standard internal builder. To enable Ninja:
Go to the top menu: Project > CMake Settings for CtrlrX.
If it shows an empty {} file, replace the entire content with this JSON configuration:
Save (Ctrl+S). Visual Studio will re-generate the cache using Ninja.
5. Compiling and Debugging
Select Build Type: In the top toolbar dropdown, choose x64-Release or x64-Debug.
Select Startup Item: Click the dropdown next to the green "Play" button (F5) and select CtrlrX_Standalone.exe (or your preferred target).
Build & Run: * Press F5 to compile and start debugging.
Press Ctrl+Shift+B to compile without running.
Output Folder:
The artifacts (Standalone, VST3) will be found in:
C:\Users%USERNAME%\Documents\CtrlrX\build\CtrlrX_artefacts\
Why use this over Projucer/SLN?
Speed: Ninja compiles files in parallel and handles incremental changes almost instantly.
Simplicity: No need to keep "resaving" in Projucer. Just edit your code and hit F5.
One Source of Truth: Your CMakeLists.txt handles everything, making it easier to manage dependencies and branches.
Tips for VST2 Support
If you still require VST2, ensure you have copied the VST2 SDK to Source/Plugin/vst2sdk as per the these instructions. CMake will automatically detect its presence and enable the VST2 targets during the configuration step.
If you run into problems, sometimes you may need to do this: Project -> Delete Cache and Reconfigure
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to Compile CtrlrX using CMake & Ninja in Visual Studio 2022
High-Speed Method for Windows 10/11. See here for projucer method
By using Visual Studio's native CMake support and the Ninja build engine, we can bypass the Projucer and achieve significantly faster compilation times.
1. Prerequisites
Before starting, ensure you have the following installed:
Visual Studio 2022 (Community, Pro, or Enterprise).
C++ CMake tools for Windows (Install this via the Visual Studio Installer under the "Desktop development with C++" workload).
Git for Windows (Optional but recommended for cloning).
2. Download and Prepare Source Code
Open PowerShell and run the following to clone the repo and extract the required Boost libraries:
PowerShell
Navigate to your Documents folder
Clone the repository
Optional: Switch to a specific maintenance branch
Extract Boost (Required for compilation)
3. Opening the Project in Visual Studio
Instead of looking for a .sln or .jucer file, we will open the folder directly.
Launch Visual Studio 2022.
On the startup screen, select Open a local folder.
Select the CtrlrX root folder (the one containing CMakeLists.txt).
Wait a few seconds. Visual Studio will detect the CMake file and begin "Generating CMake Cache" in the background. You will see progress in the Output window.
4. Configuring Ninja:
By default, Visual Studio might use its standard internal builder. To enable Ninja:
Go to the top menu: Project > CMake Settings for CtrlrX.
If it shows an empty {} file, replace the entire content with this JSON configuration:
{ "configurations": [ { "name": "x64-Release", "generator": "Ninja", "configurationType": "Release", "buildRoot": "${projectDir}\\build", "inheritEnvironments": [ "msvc_x64_x64" ] }, { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", "buildRoot": "${projectDir}\\build", "inheritEnvironments": [ "msvc_x64_x64" ] } ] }Save (Ctrl+S). Visual Studio will re-generate the cache using Ninja.
5. Compiling and Debugging
Select Build Type: In the top toolbar dropdown, choose x64-Release or x64-Debug.
Select Startup Item: Click the dropdown next to the green "Play" button (F5) and select CtrlrX_Standalone.exe (or your preferred target).
Build & Run: * Press F5 to compile and start debugging.
Press Ctrl+Shift+B to compile without running.
Output Folder:
The artifacts (Standalone, VST3) will be found in:
C:\Users%USERNAME%\Documents\CtrlrX\build\CtrlrX_artefacts\
Why use this over Projucer/SLN?
Speed: Ninja compiles files in parallel and handles incremental changes almost instantly.
Simplicity: No need to keep "resaving" in Projucer. Just edit your code and hit F5.
One Source of Truth: Your CMakeLists.txt handles everything, making it easier to manage dependencies and branches.
Tips for VST2 Support
If you still require VST2, ensure you have copied the VST2 SDK to Source/Plugin/vst2sdk as per the these instructions. CMake will automatically detect its presence and enable the VST2 targets during the configuration step.
If you run into problems, sometimes you may need to do this: Project -> Delete Cache and Reconfigure
Beta Was this translation helpful? Give feedback.
All reactions