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

Alexander Neundorf neundorf at kde.org
Sat Sep 15 16:45:45 EDT 2012


On Tuesday 11 September 2012, Brad King wrote:
> On 09/11/2012 04:08 PM, Yury G. Kudryashov wrote:
> > 2012/9/11 Alexander Neundorf <neundorf at kde.org>:
> >> Hi Yury,
> >> 
> >> will you be able to work on this for the 2.8.10 release ?
> > 
> > What are the deadlines?
> 
> Features not finished by the end of September may not be included.

I gave it a try today.
There is now a branch export-sets-2 on cmake stage.
It cherry-picks a lot of the patches from 
http://gitorious.org/~urkud1/cmake/urkud-cmake/commits/w/export-set, mostly 
those from May, and then proceeds a bit differently.

In the end, cmake now checks whether a target which is missing in the current 
export set has been exported and installed exactly once, gets the correct name 
from that one installation (i.e. the used namespace), and uses that.


Additionally it puts the following check in the generated target file:

IF(NOT TARGET "Foo::foo" )
  MESSAGE(FATAL_ERROR "Required imported target \"Foo::foo\" not found ! ")
ENDIF()

Please review the branch.
Exotic cases are not supported, but it should be possible now to export 
libraries in separate export sets and still have it work.

I guess I have to handle the error case better than simply erroring out.

Alex



More information about the cmake-developers mailing list