[KDE/Mac] Regarding building QML modules

Aleix Pol aleixpol at kde.org
Thu Feb 5 11:42:47 UTC 2015

On Wed, Feb 4, 2015 at 2:48 PM, René J.V. <rjvbertin at gmail.com> wrote:
> On Wednesday February 04 2015 12:49:13 Aleix Pol wrote:
> Hi Aleix,
>> >> I received this bug report [1], I guess this should be figured out. It
>> >> suggests using add_library(MODULE) instead of add_library(SHARED) for
>> >> QML modules, as they are not meant to be linked to.
> I admit I haven't looked at the bug report, but just be aware of one thing. On Linux there is AFAIK no difference other than in the name between a binary made with add_library(MODULE) or add_library(SHARED). On OS X with a stock cmake, there is: they're created using different linker flags (-bundle vs. -dynamiclib IIRC).
> As a result, the latter can be loaded as plugins, but the former cannot be used as shared libraries, not even when you give the full path to the linker. There may be other subtle differences (like whether or not unloading is possible after dynamically loading one), but one can use as a general rule that there is no more need to use -bundle on modern OS X versions.
> I have no hard opinion on using a lib prefix or not. For plugins it's probably easier not to add one, esp. if the prefix isn't the same on all supported platforms.
> R.

Maybe it would just be simpler if we dropped the lib* prefix over in QML....


More information about the kde-mac mailing list