Commit 2257d9cf authored by Sang Ik Lee's avatar Sang Ik Lee Committed by Robert Kimball

Fix install path on Windows (#2765)

* CMAKE_CFG_INTDIR does not work at install time. Use CMAKE_INSTALL_CONFIG_NAME on Windows.

* Rename NGRAPH_*_INSTALLSRC_DIRECTORY to NGRAPH_*_INSTALL_SRC_DIRECTORY
parent b1b0ea87
......@@ -413,12 +413,17 @@ endif()
set(NGRAPH_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/ngraph)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
set(NGRAPH_LIBRARY_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR}/${CMAKE_CFG_INTDIR})
if(WIN32)
set(NGRAPH_LIBRARY_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR}/${CMAKE_CFG_INTDIR})
set(NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY ${NGRAPH_BUILD_DIR}/\${CMAKE_INSTALL_CONFIG_NAME})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
set(NGRAPH_ARCHIVE_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR}/${CMAKE_CFG_INTDIR})
set(NGRAPH_ARCHIVE_INSTALL_SRC_DIRECTORY ${NGRAPH_BUILD_DIR}/\${CMAKE_INSTALL_CONFIG_NAME})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
else()
set(NGRAPH_LIBRARY_OUTPUT_DIRECTORY ${NGRAPH_BUILD_DIR})
set(NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY ${NGRAPH_BUILD_DIR})
endif()
set(EXTERNAL_INSTALL_DIR ${CMAKE_BINARY_DIR}/external)
......
......@@ -312,12 +312,12 @@ endif()
if(WIN32)
install(
FILES
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLML_LIB}
${NGRAPH_ARCHIVE_OUTPUT_DIRECTORY}/${MKLML_IMPLIB}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${OMP_LIB}
${NGRAPH_ARCHIVE_OUTPUT_DIRECTORY}/${OMP_IMPLIB}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLDNN_LIB}
${NGRAPH_ARCHIVE_OUTPUT_DIRECTORY}/${MKLDNN_IMPLIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLML_LIB}
${NGRAPH_ARCHIVE_INSTALL_SRC_DIRECTORY}/${MKLML_IMPLIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${OMP_LIB}
${NGRAPH_ARCHIVE_INSTALL_SRC_DIRECTORY}/${OMP_IMPLIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLDNN_LIB}
${NGRAPH_ARCHIVE_INSTALL_SRC_DIRECTORY}/${MKLDNN_IMPLIB}
DESTINATION
${NGRAPH_INSTALL_LIB}
OPTIONAL
......@@ -325,9 +325,9 @@ if(WIN32)
else()
install(
FILES
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLML_LIB}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${OMP_LIB}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLDNN_LIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLML_LIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${OMP_LIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLDNN_LIB}
DESTINATION
${NGRAPH_INSTALL_LIB}
OPTIONAL
......@@ -335,8 +335,8 @@ else()
if(NGRAPH_LIB_VERSIONING_ENABLE)
install(
FILES
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLDNN_SHORT_LIB}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${MKLDNN_FULL_LIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLDNN_SHORT_LIB}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${MKLDNN_FULL_LIB}
DESTINATION
${NGRAPH_INSTALL_LIB}
OPTIONAL
......
......@@ -63,10 +63,10 @@ if(NGRAPH_TBB_ENABLE)
${TBB_BUILD_DIR}/${TBB_LIB}.${TBB_SOVER}
DESTINATION ${NGRAPH_LIBRARY_OUTPUT_DIRECTORY})
endif()
install(FILES ${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${TBB_LIB}
install(FILES ${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${TBB_LIB}
DESTINATION ${NGRAPH_INSTALL_LIB})
if(LINUX)
install(FILES ${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${TBB_LIB}.${TBB_SOVER}
install(FILES ${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${TBB_LIB}.${TBB_SOVER}
DESTINATION ${NGRAPH_INSTALL_LIB})
endif()
add_library(libtbb INTERFACE)
......
......@@ -69,8 +69,8 @@ if (WIN32)
DEPENDEES download
)
install(FILES ${NGRAPH_ARCHIVE_OUTPUT_DIRECTORY}/${TBB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
install(FILES ${NGRAPH_ARCHIVE_INSTALL_SRC_DIRECTORY}/${TBB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${NGRAPH_INSTALL_LIB})
elseif(APPLE)
set(TBB_LINK_LIBS
......@@ -82,7 +82,7 @@ elseif(APPLE)
COMMENT "Move tbb libraries to ngraph build directory"
)
install(FILES ${NGRAPH_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
install(FILES ${NGRAPH_LIBRARY_INSTALL_SRC_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${TBB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${NGRAPH_INSTALL_LIB})
endif()
......
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