I am installing a library with the following code

export(TARGETS mylib
   APPEND FILE mylibConfig.cmake
)
install(TARGETS mylib
   EXPORT mylib-install
   DESTINATION ${PREFIX_LIB}
)

where mylib has been previously been added as a library.

I am also installing a directory of headers as follows

install(DIRECTORY ${MYLIB_BINARY_DIR}/mylib
   DESTINATION include
   USE_SOURCE_PERMISSIONS
   )

This installs everything where I want, but I would like to export the headers as mylib_headers so that I can later do

find_package(mylib NO_MODULE)
include_directories(${mylib_headers})

Where ${mylib_headers} resolves to ${CMAKE_INSTALL_PREFIX}/include of my library install.

How do I do this with CMake 2.6?

Thank you.

Mike

_______________________________________________
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