[CMake] INSTALL( EXPORT ... requires target that is not in export set
Hugh Sorby
h.sorby at auckland.ac.nz
Mon Dec 7 20:59:37 EST 2009
I am trying to use INSTALL( EXPORT ... but failing. I have a project
like this
ImageMagick/CMakeLists.txt -- 1.
ImageMagick/magick/CMakeLists.txt -- 2.
ImageMagick/coders/CMakeLists.txt -- 3.
1. calls ADD_SUBDIRECTORY for both 2 and 3
2. has a target "magick" that is a library
3. has a target "coders" that is a library
2 needs 3 so in 2 I have the line
TARGET_LINK_LIBRARIES( magick coders )
then I have
INSTALL( TARGETS magick EXPORT magick-targets ARCHIVE
DESTINATION lib )
and then I try
INSTALL( EXPORT magick-targets DESTINATION lib/cmake )
which doesn't fly and I get the error message
CMake Error: INSTALL(EXPORT "MagickCore-targets" ...) includes target
"MagickCore" which requires target "coders" that is not in the export set.
Is there someone who can enlighten me on how this works I have read the
documentation but I am unclear (as in it's not crystal to me).
More information about the CMake
mailing list