[cmake-developers] Exporting dependent library targets in multiple export sets

Yury G. Kudryashov urkud.urkud at gmail.com
Wed Aug 22 16:57:51 EDT 2012


Hi,

2012/8/23 Alexander Neundorf <neundorf at kde.org>:
> Hi,
>
> If I would do this, I would get the error for the BarExport export set, that
> it does not contain target foo, which it depends on.
>
> We'd like to make this work, since we need this in KDE.
>
> How can this be done ?
Sorry for the very long silence. I had rather rich real life (e.g., my
son born about a month ago).

> Here's a relatively simple (I think) idea: export it anyway, and make sure in
> the generated targets file that those targets which were not part of the
> export-set exist:
I'm going to push the current state of my work to
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git w/export-set
in a few minutes.

It should work, though I haven't tested it yet. The idea is simple:
each target remembers the latest
install(TARGETS ... EXPORT)
command, and each export set remembers teh latest
install(EXPORT MyExport)
command. Then we query this information.


> There is an issue with the used namespace. Maybe it could simply assume that
> the targets which are not present use the same namespace as it does itself (as
> shown in the example above) ?
>
> Also, CMake could still error out if it detects that a library which an
> exported library depends on, is not exported at all, also taking into account
> the namespace.
>
> Would that work ?
> Did I miss something ?
> Better ideas ?
>
> Alex



-- 
Yours Yury,
mailto: urkud.urkud at gmail.com



More information about the cmake-developers mailing list