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).


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to