[CMake] Have an export file split in 2 parts? Need caused by a cmake bug?
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Jul 6 15:52:20 EDT 2009
On Monday 06 July 2009, Alexandre.Feblot at thomsonreuters.com wrote:
> 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?
I think this is not possible.
> 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.
But you can export them in different export sets, so two different sets of
libraries get installed with two different export files.
Would that help ?
> 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
If they have not been imported, then cmake cannot know that this should be
also an imported target instead of just the name of a library. How should
it ?
Do I understand you correctly ?
Alex
More information about the CMake
mailing list