I have recently successfully included this code in a project I’m working on, and while our situations are not exactly the same, I hope showing you what worked for me will help you get where you need to go. First, my directory structure:
I opted to go with CMake to integrate the
chowdsp tools because while it was a little upfront effort, the payoff is that it’s much easier to integrate other projects, and it feels more “in control” than the Projucer. Having said that, if I could have figured out how to just keep using the Projucer, I probably would have. You’ll also note that JUCE is now a submodule, as opposed to what I consider the “native” or “original” JUCE way of keeping the project in the
projects folder. As it so happens, this project is in that folder, but it’s no longer important it be kept there.
Now for the submodule:
git submodule add https://github.com/juce-framework/JUCE Modules/JUCE
git submodule add firstname.lastname@example.org:Chowdhury-DSP/chowdsp_utils.git Modules/chowdsp_utils
git submodule update --init --recursive
path = Modules/JUCE
url = https://github.com/juce-framework/JUCE
path = Modules/chowdsp_utils
url = https://github.com/Chowdhury-DSP/chowdsp_utils
Now that we have that, if you choose to use CMake, you will need to configure it, which is not that hard ultimately. To get started, consider the documentation:
In the JUCE/examples/CMake directory, you’ll find example projects for a GUI app, a console app, and an audio plugin. You can simply copy one of these subdirectories out of the JUCE repo, add JUCE as a submodule, and uncomment the call to add_subdirectory where indicated in the CMakeLists.txt. Alternatively, if you’ve installed JUCE using a package manager or the CMake install target, you can uncomment the call to find_package.
In my root CMake, I have:
Which in turn has:
This tells CMake to go look for the CMakeLists.txt in each of these respective folder, which when you run
cmake --build ., should correctly create a Visual Studio or Xcode project for you to consume, where you will be able to:
The project I did this for is still in active development, but this particular portion is working. If you can stomach the CMake API for this, it may well be worth it. I hope this at least helps a little! Good luck!