-
Notifications
You must be signed in to change notification settings - Fork 31
Add option to build dependency as Shared Object (.so / .dll) #39
Comments
@carlos22 I don't think that is something qpm could do automatically, but it is something we could maybe promote as a pattern that people should follow. The bare minimum required for a qpm package today is that it has a relatively simple .pri file. This file cannot be built by itself, but must be included by a .pro file in order for it to be a built. Today qpm is optimized for the case where the .pro that builds the dependencies is the same as the app, but there is no reason that you could not add another .pro file to your app that builds the shared library by including the .pri file of one (or more) dependencies. Your app could be structured like this:
Package authors could add a .pro themselves which simply includes the .pri file and specifies a shared library as the output. This is certainly a useful addition to a package and several packages have used this approach such that they can easily be included statically in an app or built as separate libraries/plugins. The bigger problem here might be managing include paths and exporting symbols. It's probably doable, but a documented example would probably help. In any case, I think this really has to be solved by the package authors since they are the ones who best know how to compile their package into a shared library. Would you agree or how do you see qpm solving this? |
Just leaving my comment here: The general Idea is: use specific macros etc, and your qpm package can be build as library by letting the user "change a switch" of qpm. Just to give an idea, of what qpm could support (i.e. via an extended vendor.pri), to make this easier for developers and users:
The question of course is how far to take this, and how relevant it actually is. But it would defenitly be a nice little extra. |
I think what @Skycoder42 suggests sounds very reasonable. Currently I try to set up what @jrbarron suggested as solution to the problem. But better integration in qpm will help for greater use of the system - maybe also for some well-known libraries such as qwt or similar... |
This is especially useful for LGPL libraries which are used in non-LGPL/GPL compatible projects (including but not limited to commercial projects). Not sure if this is easy to implement. Any ideas?
The text was updated successfully, but these errors were encountered: