[CMake] Help for exporting target information from install tree
He Yuqi
yuqi.he at gmail.com
Tue Oct 25 22:59:56 EDT 2011
Hello,
I am encountering specific problems and hope someone can help me.
I'm working on a patch to export target information from install tree for
OCE <https://github.com/tpaviot/oce> project. The OCE project use CMake to
manage the build process. For some reasons, OCE project install targets into
*bin* directory in *Release* configuration and *bind* directory in
*Debug*configuration. But there's something wrong when exporting
target
information.
My first solution is:
INSTALL(TARGETS ${TOOLKIT}
> *EXPORT ${PROJECT_NAME}-libraries*
> RUNTIME DESTINATION ${TOOLKIT_INSTALL_BIN_DIR} CONFIGURATIONS
> Release RelWithDebInfo MinSizeRel COMPONENT RuntimeLibraries
> LIBRARY DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS
> Release RelWithDebInfo MinSizeRel COMPONENT RuntimeLibraries
> ARCHIVE DESTINATION ${TOOLKIT_INSTALL_LIB_DIR} CONFIGURATIONS
> Release RelWithDebInfo MinSizeRel COMPONENT Development
> )
> INSTALL(TARGETS ${TOOLKIT}
> *EXPORT ${PROJECT_NAME}-libraries*
> RUNTIME DESTINATION ${TOOLKIT_INSTALL_BIN_DEBUG_DIR} CONFIGURATIONS
> "Debug" COMPONENT RuntimeLibraries
> LIBRARY DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS
> "Debug" COMPONENT RuntimeLibraries
> ARCHIVE DESTINATION ${TOOLKIT_INSTALL_LIB_DEBUG_DIR} CONFIGURATIONS
> "Debug" COMPONENT Development
> )
>
>
But CMake report the ${TOOLKIT} target had export more than once and stop
the generation.
Than I remove the export line in *Debug* configuration. Everything is well,
but the import information do not export into OCE-libraries-debug.cmake
file.
Any suggestion?
He Yuqi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111026/34d3f857/attachment.htm>
More information about the CMake
mailing list