[cmake-developers] Exporting dependent library targets in multiple export sets
Brad King
brad.king at kitware.com
Wed Aug 22 16:52:47 EDT 2012
On 08/22/2012 04:15 PM, Alexander Neundorf wrote:
> add_library(foo SHARED foo.c)
>
> install(TARGETS foo EXPORT FooExport DESTINATION lib )
> install(TARGETS foo EXPORT FooExportX DESTINATION libx )
>
> install(EXPORT FooExport DESTINATION lib/foo )
> install(EXPORT FooExport NAMESPACE "Foo::" DESTINATION lib/foo2 )
> install(EXPORT FooExportX DESTINATION lib/fooX )
>
> add_library(bar SHARED bar.c)
> target_link_libraries(bar foo)
>
> install(TARGETS bar EXPORT BarExport DESTINATION lib )
>
> install(EXPORT BarExport NAMESPACE Xyz:: DESTINATION lib/bar )
>
> ------------------------------------
>
> 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.
Didn't we discuss that here:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/2833/focus=2968
? We need to allow export sets to depend on other export sets
to get their dependencies? The namespace of the dependency
will then be known.
-Brad
More information about the cmake-developers
mailing list