[CMake] IMPORTED / EXPORTED targets

Jérémy Coulon jeremy.coulon at free.fr
Thu May 12 16:41:51 EDT 2011


Hello,

I'm currently playing with imported / exported targets.
Let's say I build a project A for both static and shared variants.
A depends on a 3rd party static library called B.
Internally, B depends on another static library called C.

My project A builds fine.
But when I try to export my targets it seems like the dependency graph 
is not correct.
Thus I probably won't be able to use A in another project.

See attached CMakeLists.txt to see how I import / export targets.

For target A_SHARED everything looks OK.
But I would expect that for target A_STATIC the following property
IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG "B_STATIC;C_STATIC"
but the "C_STATIC" dependency is missing from the generated 
MyExports-noconfig.cmake

Please, can you tell me if there is something wrong in my cmake script ?
What is the expected behavior ?

Thanks.

Jérémy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FooooBar.tar.gz
Type: application/gzip
Size: 557 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110512/6489aab1/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110512/6489aab1/attachment.txt>


More information about the CMake mailing list