[CMake] the remaining problems with compiling KDE with cmake

Ken Martin ken.martin at kitware.com
Mon Jun 13 09:38:33 EDT 2005


> The biggest problem I still have is that in KDE relatively often there is
> an application kfoo and a library libkfoo.so, which results in cmake in
> the same name for the target (kdevelop + libkdevelop.so, libkasbar.so +
> kasbar, kdesu + libkdesu, almost: konqueror + libkonq.so, kicker +
> libkickermain.so, and probably more).
> 
> I see two ways around it:
> 1) implement something in cmake so that the executable is built e.g. as
> "kdevelop_app", but when installing it is installed as "kdevelop" (e.g.
> SET_TARGET_PROPERTY(kdevelop_app PROPERTIES INSTALL_NAME kdevelop)

Certainly easy to do...


> 2 and much better) enable cmake to deal correctly with targets with the
> same name if they are of different type (i.e. once ADD_EXECUTABLE and
> once ADD_LIBRARY). This would be much better but I know it would probably
> also mean a lot of work.

This is probably the better long term solution since it doesn't require
CMakeLists writers to worry about it. I'll add it to my to-do list. I don't
think it is too difficult to implement, not trivial but not a killer.
Basically I'll change the internal workings of how executables are handled
(since they are the less complex case). Some commands like
SET_TARGET_PROPERTIES will need an option to disambiguate targets when there
are both libs and exe with the same name.

Ken






More information about the CMake mailing list