raspberrypi / libcamera

Other
223 stars 95 forks source link

Specific reason for using shared_library over library? #105

Closed callum-hopkins-dev closed 8 months ago

callum-hopkins-dev commented 8 months ago

Is there any particular reason for using the explicit shared_library meson function over the more generic library function?

In some cases, it can be useful to generate static libraries for simplified linking on platforms such as alpine.

If there isn't a good reason for it, would you be willing to look at a PR by me which would allow both static and dynamic libraries?

kbingham commented 8 months ago

I believe it is already successfully packaged by Alpine:

Static linkage would create complicated licensing scenarios with the L-GPL which is likely not intended. Furthermore, we explicitly build IPA modules as shared objects so that they can be loaded and verified as modules on the needs of the platform and can be interchanged with closed source IPA modules in some cases.

callum-hopkins-dev commented 8 months ago

Oh, that makes sense.

Thanks for the info :smiley: