Any way to add a sub-project to a VS2019 Project via Projucer?

I have a static library built in JUCE (5.4.7), that is then linked into a JUCE app.

In Xcode on the Mac, in the Exporter Settings for Xcode (Mac OSX), there is a field “Xcode Subprojects” where you can specify a path to the library’s .xcodeproj, and when you export from the Projucer it will make the main app project with the library included as a sub-project. You can then work on both and compile them at the same time and it links the library right in.

Is there a way to do that in Visual Studio 2019? There does not seem to be any Projucer setting that will accomplish that.

Manually, in the VS Solution, you can “add Existing Project” and bring the library project into the main app’s solution, and then specify that the main app depends on the library, and it will do the same thing as Xcode - great! Except the next time you export from the Projucer file, it throws the library entry away and you only have the main project in the solution. You have to add the library project again every time you update the Projucer file.

I’m in the process of moving most/all of my projects to JUCE6/CMake, but I have to say- I wanted that feature for a long time in the Projucer.

P.S. Not exactly what you want, but sometimes you can do it the other way around: create a master VS solution somewhere that has the Projucer-generated VS project as a referenced project, as well as any other project you might want to add.

1 Like