On 22. Apr, 2010, at 14:44 , Nicola Brisotto wrote:
> Hi,
> I'm building a library QXmppClient that export properties with INSTALL
> (EXPORT ...)
> How can I also export a variable with the include path of the library?
>
> In the executable project I use find_package(QXmppClient). The target
> QXmppClient is imported so I can link with:
> TARGET_LINK_LIBRARIES(myexecutable QXmppClient )
>
> This is a snippet from the QXmppClient CMakeLists.txt:
>
> ADD_LIBRARY(QXmppClient ${SRC})
> TARGET_LINK_LIBRARIES( QXmppClient ${LIB} )
>
> INSTALL(TARGETS QXmppClient EXPORT QXmppClientConfig
> DESTINATION lib/QXmppClient )
> INSTALL(FILES
> ${Qt4_MOC}
> DESTINATION include/QXmppClient)
> #Export Target into include dir
> INSTALL(EXPORT QXmppClientConfig DESTINATION lib/QXmppClient )
>
>
> Nicola Brisotto
Call your export file QXmppClientExports instead, create a file
QXmppClientConfig.cmake.in in which you include the QXmppClientExports.cmake
file and configure it appropriately. In that same file you can then set
QXMPPCLIENT_INCLUDE_DIR, QXMPPCLIENT_LIBRARIES etc.
HTH
Michael
_______________________________________________
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