I’m pretty sure it is not “best practice”, but you can have a look at how it’s done in kontroller: GitHub - Julien-Blanc-tgcm/kontroller (yes, it follows the subdir approach), it compiles qjsonrpc as part of the build process. It’s been real pita to make it work iirc (but I’m really not a qmake guru). And if the library is using anything else than a .pro file, you’re dead.
Thanks! That’s what I was looking for. I think it’d be great to mix and match cmake and qmake but obviously a nightmarish scenario
EDIT: I think from a QT perspective, it is ‘Textbook’ aka ‘Best Practice’ ! I just needed an example with sailfish context but you have multiple targets.
EDIT2: The one significant difference that I see on closer inspection is that you are including via git a QT project. So, if I understand correctly the qjsonrpc library is pulled from it’s repo and since it has a compatible build will work with your dirs based template. That brings me back to how to include a foreign build.
For the time being, since it’s small and no one but the author (and now me) are working on it, I can just twist it into a qmake build, but for the future, I should work out how to add another make step.
Ok, just looking through the .git files I don’t see how the qjsonrpc library is being pulled from it’s parent? But I’m a ‘primitive’ git user. I tried:
git submodule update --init --recursive
which get’s
Submodule 'qjsonrpc' (https://github.com/Julien-Blanc-tgcm/kontroller.git/qjsonrpc) registered for path 'qjsonrpc'
Cloning into '/home/mwa/src/sailfish/kontroller/qjsonrpc'...
remote: Not Found
Yes, obviously i messed up when i set the url. Since this repo never changed, i did not notice it.
You can simply git clone https://github.com/Julien-Blanc-tgcm/qjsonrpc.git in the qjsonrpc directory, that will do it (will fix that, but i don’t have the time right now).
I’ve got a build for included static build that I’m going to use as a how-to. It’s an SDL audio synth. But it’s going to take some time before i can turn it into a proper how-to: