[CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Mar 28 08:53:39 EDT 2011


You still need to install that lib even if it is not used by 3rd party
application, it is used inernally by your own application.


INSTALL(TARGETS publiclib privatelib...)

2cts

On Mon, Mar 28, 2011 at 2:51 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
> I try to do an INSTALL(EXPORT) to allow others to link against one of my
> libraries. That libraries is linked against some other internal libraries
> the target's don't need to link to as everything in them is purely
> internal.
>
> I tried something like that:
>
> ADD_LIBRARY(publiclib SHARED    ${publiclib_SOURCES})
>
> TARGET_LINK_LIBRARIES(publiclib privatelib)
>
> SET_TARGET_PROPERTIES(publiclib PROPERTIES LINK_INTERFACE_LIBRARIES "")
>
> INSTALL(TARGETS publiclib
>                        EXPORT publiclib_export
>                        RUNTIME DESTINATION bin
>                        LIBRARY DESTINATION lib
>                        ARCHIVE DESTINATION lib)
>
> INSTALL(EXPORT publiclib_export DESTINATION cmake/modules)
>
> This results in:
>
> Make Error: INSTALL(EXPORT "publiclib_export" ...) includes target
> "publiclib" which requires target "privatelib" that is not in the export
> set.
>
> Ehm, no, it doesn't? Is this intentional (why?), is there a workaround or
> should I file a bug report?
>
> Eike
> _______________________________________________
> 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
>



-- 
Mathieu


More information about the CMake mailing list