Commit fbbc6ad0 authored by Ilya Lavrenov's avatar Ilya Lavrenov Committed by Scott Cyphers

CMAKE: usage relative paths, added ngraph component (#3970)

parent dd66409a
......@@ -328,10 +328,10 @@ endif()
message(STATUS "Installation directory: ${CMAKE_INSTALL_PREFIX}")
# Destinations
set(NGRAPH_INSTALL_LIB "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set(NGRAPH_INSTALL_INCLUDE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
set(NGRAPH_INSTALL_DOC "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
set(NGRAPH_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
set(NGRAPH_INSTALL_LIB "${CMAKE_INSTALL_LIBDIR}")
set(NGRAPH_INSTALL_INCLUDE "${CMAKE_INSTALL_INCLUDEDIR}")
set(NGRAPH_INSTALL_DOC "${CMAKE_INSTALL_DOCDIR}")
set(NGRAPH_INSTALL_BIN "${CMAKE_INSTALL_BINDIR}")
if (LINUX)
if (DEFINED NGRAPH_RPATH)
set(CMAKE_BUILD_RPATH "$ORIGIN:${NGRAPH_RPATH}")
......@@ -637,7 +637,8 @@ export(TARGETS ngraph NAMESPACE ngraph:: FILE "${CMAKE_CURRENT_BINARY_DIR}/ngrap
install(EXPORT ngraphTargets
FILE ngraphTargets.cmake
NAMESPACE ngraph::
DESTINATION cmake)
DESTINATION cmake
COMPONENT ngraph)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/share/ngraphConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake
......@@ -649,11 +650,13 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/licenses
DESTINATION "${CMAKE_INSTALL_PREFIX}"
DESTINATION "."
COMPONENT ngraph
)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION "." COMPONENT ngraph)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION "." COMPONENT ngraph)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake )
DESTINATION cmake
COMPONENT ngraph)
......@@ -729,16 +729,21 @@ endif()
#-----------------------------------------------------------------------------------------------
# nGraph
install(TARGETS ngraph DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT ngraphTargets) # libngraph.so
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph"
install(TARGETS ngraph EXPORT ngraphTargets
RUNTIME DESTINATION ${NGRAPH_INSTALL_LIB}
ARCHIVE DESTINATION ${NGRAPH_INSTALL_LIB}
LIBRARY DESTINATION ${NGRAPH_INSTALL_LIB}
COMPONENT ngraph)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION ${NGRAPH_INSTALL_INCLUDE}/ngraph
COMPONENT ngraph
FILES_MATCHING
PATTERN "*.hpp"
PATTERN "*.h"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/version.hpp
DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph")
DESTINATION ${NGRAPH_INSTALL_INCLUDE}/ngraph
COMPONENT ngraph)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
......
Markdown is supported
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