How to deal with inter-dependencies with jucer projects?


#1

Hi,

Sounds like a basic question and yet I couldn’t find anything close to my problem on this forum… So I’m giving it a shot.

I have a jucer file that configures a static library project. I would like to refer to this project (and link to it) in another GUI Application jucer project. On XCode you would usually add the library project to the executable project and make sure that the target is depending on the library project’s output and that the corresponding library is linked… which is what I’m doing right now but as you might have already guessed this is automatically removed every time the executable project gets built by Projucer.

What would be your solution? If any?

Thanks!


#2

My solution is/would be to put any reusable classes into modules and therefore be able to reference them from multiple jucer projects. I keep those modules in separate private Git repositories (BitBucket is free for private repositories).

I try to avoid static libraries if possible.


#3

Thanks but it doesn’t really answer my question unfortunately. I have good reasons to want to make this a static library, one of them being that I also don’t want people using my library to necessary have to get any knowledge of whatsoever in Juce, and therefore to have to deal with Juce modules. :slight_smile:


#4

In that case you can treat your library like any other external library. You can add this in the projucer and the exporter will add the linker call to the project file.
There are already very good examples how to achieve this, so I simply quote an arbitrary answer with nice screenshots:

That approach worked for me using the sodium crypto library…

Or you can use the forum search for “external library” for alternative solutions…

N.B. I also found the solution @adamsky proposed very helpful. The big benefit is, that you can browse the source code and debug much more easily. But as you said, you probably have good reasons to have it as library too.


#5

HI daniel!

hum I’m afraid my requirements and my idea aren’t clear enough.
I do know how to make sure a project will link with another library but I want to make jucer projects inter-dependent.

In fact here is the thing, I want to be able to concatenate jucer projects within a jucer project. It sounds like a new feature to me. One’d simply add a jucer file to another jucer project and it’d recognized as a dependent target. Then when the IDE projects get generated it makes sure that the other jucer project(s) get generated upfront and added to the solution. Then the only thing one’ll have to do then is to write the name of the static library in the correct field in Projucer… but then yes everything would be fully automated.


#6

Hi tbop,
I understand, but I don’t think this is possible with juce. Maybe somebody frome the juce team can comment, if something like this is planned, or if it maybe is already possible…


#7

Yeah, projucer projects don’t currently have any support for listing other dependent projects. Could be something we’ll add, it’s been mentioned before.


#8

Hi jules! Bad news but that’s all I wanted to know and that confirms what I thought. Hope this becomes available one day. Thanks to you! :slight_smile: