LIBRARY_TYPE in ECMQtFramework.cmake

Stephen Kelly steveire at gmail.com
Mon May 7 21:40:28 UTC 2012


Alexander Neundorf wrote:

> Hi,
> 
> in ECMQtFramework.cmake there is the line
> 
> set(LIBRARY_TYPE SHARED)
> 
> which is used later on in the libraries e.g. like this:
> 
> add_library(itemmodels ${LIBRARY_TYPE} ${itemmodels_SRCS})
> 
> What is this good for ?
> It is not in the cache, so it is hardcoded.

The intention was to fix that at some point. I never looked into the 
details, but wanted to keep in parametrizable (as it is in KDE4 I think).

> To switch between shared and static libs, there is the cmake variable
> BUILD_SHARED_LIBS, which can be set to TRUE or FALSE depending on what is
> wanted (defaults to not set i.e. to static libs).
> 
> So, is the intent to have it switchable (then BUILD_SHARED_LIBS should be
> preset to TRUE in the cache), 

Right. Cool.

> or is the reason to hardcode it to SHARED ?
> 
> Beside that, do we actually (want to) support building static libs ?

Probably not 'support'. I'm sure we can allow it to be possible without too 
much effort or without calling it supported.

But indeed I don't think we need this LIBRARY_TYPE thing.

Thanks,

Steve. 



More information about the Kde-frameworks-devel mailing list