branches/KDE/4.3/kdelibs/nepomuk/core
Andreas Pakulat
apaku at gmx.de
Fri Jun 26 20:59:48 CEST 2009
On 26.06.09 12:56:09, Brad King wrote:
> Andreas Pakulat wrote:
> > The cmake manpage pretty clearly explains what you're seeing here, the
> > _<CONFIG> versions correspond to the config of the project into which the
> > library is imported. Which totally makes sense, but also means you have to
> > build the whole stack with the same config option (which basically means
> > enforcing a limiation that comes from one platform onto all others)
>
> We've already anticipated the case of importing from a project that
> uses different configurations:
>
> http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_tgt:MAP_IMPORTED_CONFIG_CONFIG
>
> An imported configuration is chosen for a given local configuration
> as follows:
>
> 1.) Check for MAP_IMPORTED_CONFIG_<LOCAL> property. If set, one of
> the listed configurations must be available or it is not found.
> 2.) Check for an exact-match for the <LOCAL> configuration name.
> 3.) Accept any available imported configuration. The lack of any
> MAP_IMPORTED_CONFIG_<LOCAL> property indicates any config is
> acceptable.
>
> Unfortunately the MAP_* properties must be set by the importing
> project on every imported target. I needed to gain experience
> with a real project facing this problem before designing a simple
> way to set all these properties.
I don't think I can understand the reasoning for this being explicit
(except on windows where there's a real problem mixing libs from
differing configs). Lets take KDevelop and the KDevPlatform module. The
latter has quite some libraries in it, one of them may link against
kdecore+kdeui+kfile and has all three of them in its link-interface
(because it actually has one symbol from kfile in one of the methods in
it). Now there's this plugin, it uses the library, but itself it only
uses symbols from that library, kdeui and kdecore. Hence it looks to be
fine, but a linker that is as strict as MSVC's or gold's will probably
complain about the missing kfile library when linking.
Hence this plugin would need to set the above mentioned variable on
Linux/Unix/Mac. Along with all other plugins and all other apps etc.
Or am I misunderstanding something?
Andreas
--
Expect a letter from a friend who will ask a favor of you.
More information about the Kde-buildsystem
mailing list