Commit 2d194ef9 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[CMake] Use export.

parent a0ee2165
......@@ -21,6 +21,7 @@ SET(CXX_DISABLE_WERROR TRUE)
SET(PROJECT_NAME hpp-pinocchio)
SET(PROJECT_DESCRIPTION "Wrapping of the kinematic/dynamic chain Pinocchio for HPP.")
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" ON)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/boost.cmake)
......
......@@ -55,4 +55,9 @@ ADD_LIBRARY(${LIBRARY_NAME}
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} pinocchio)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
INSTALL(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
export(TARGETS ${LIBRARY_NAME}
NAMESPACE ${PROJECT_NAME}::
FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment