[Solved] Avoid Projucer linking the Shared Code target to external libraries

Hi guys,

this to me looks more like a bug than a FR, but anyways, here it goes:

when you create an audio plugin project, the Projucer generates Xcode and VS projects with multiple targets (VST, AU etc.). These targets are then linked to the Shared Code target.

If you add additional external prebuilt libraries to the project, the Projucer writes the linking settings to all targets, including the Shared Code target.

The linking settings should be applied just to the targets that generate the final binaries (VST, AU etc.) and not to the Shared Code target, which is not the final target.

Can you please change this?
Sometimes this can even generate warnings and slow down things.


Pretty please?
Here’s a patch for the Xcode and VS exporters :smiley:

patch.diff (3.2 KB)

If you look at this line of the MSVC exporter you can see that if we’re building the shared code target then no libs will be added to the AdditionalDependencies element, so your change isn’t necessary. I’ll take a look at the Xcode exporter to see if we can do the same thing there though.

Hi Ed! My bad, I’m still using an older version of the library.
Thank you for looking into this!

OK, I’ve pushed the following commit to develop which brings the Xcode exporter in line with the behaviour of the VS exporter for the shared code target:

1 Like

Nice! I think you can close this thread now. Thanks again!