[CMake] Have an export file split in 2 parts? Need caused by a cmake bug?

Alexandre.Feblot at thomsonreuters.com Alexandre.Feblot at thomsonreuters.com
Mon Jul 6 07:47:21 EDT 2009


Hi,

 

I need to export() some libraries, but I need to have the part

 

ADD_LIBRARY(xxxx STATIC IMPORTED)

 

and the part

 

SET_PROPERTY(TARGET xxxx APPEND PROPERTY IMPORTED_CONFIGURATIONS
RELEASE)

SET_TARGET_PROPERTIES(xxxx PROPERTIES

  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "yyyy;zzzz"

  IMPORTED_LOCATION_RELEASE "/path/to/libxxxx.a"

  )

 

in different files, so that I can first add all libraries, and then set
all their properties.

 

How can I do that?

 

WARNING: exporting all libs in a single export file is NOT an option: I
may have to import later some of these libs, but not all of them, so
each of them must have it's own export file.

 

ROOT CAUSE of the question: when importing a number of libs (which
reference each other in the IMPORTED_LINK_INTERFACE_LIBRARIES) using the
standard export files generated by cmake, it seems that libs found in
the IMPORTED_LINK_INTERFACE_LIBRARIES are not taken into account if they
have not been imported at that time (they are just understood as
different targets not known in the project, leading to a -l<name> in the
final link line).

This is not the case with usual targets which can be referenced in some
cmake files before they have actually been created.

Is this a bug, or it wanted, and why?

 

 

 

Regards,

Alexandre

 



This email was sent to you by Thomson Reuters, the global news and information company.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090706/b9a7ac76/attachment.htm>


More information about the CMake mailing list