diff --git a/cmake/openvino.cmake b/cmake/openvino.cmake index 06f289f64f..8ce8040f45 100644 --- a/cmake/openvino.cmake +++ b/cmake/openvino.cmake @@ -65,8 +65,13 @@ if(WIN32) set(OPENVINO_LIB "${OPENVINO_INSTALL_DIR}/lib/openvino.lib" CACHE FILEPATH "OPENVINO shared library." FORCE) - file(RENAME ${OPENVINO_INSTALL_DIR}/lib/intel64/Release ${OPENVINO_INSTALL_DIR}/lib) - file(RENAME ${OPENVINO_INSTALL_DIR}/bin/intel64/Release ${OPENVINO_INSTALL_DIR}/bin) + file(GLOB_RECURSE OPENVINO_LIB_FILES ${OPENVINO_INSTALL_DIR}/lib/intel64/Release/*) + file(COPY ${OPENVINO_LIB_FILES} DESTINATION ${OPENVINO_INSTALL_DIR}/lib/) + file(REMOVE_RECURSE ${OPENVINO_INSTALL_DIR}/lib/intel64) + + file(GLOB_RECURSE OPENVINO_BIN_FILES ${OPENVINO_INSTALL_DIR}/bin/intel64/Release/*) + file(COPY ${OPENVINO_LIB_FILES} DESTINATION ${OPENVINO_INSTALL_DIR}/bin/) + file(REMOVE_RECURSE ${OPENVINO_INSTALL_DIR}/bin/intel64) elseif(APPLE) set(OPENVINO_LIB "${OPENVINO_INSTALL_DIR}/lib/libopenvino.dylib" @@ -83,6 +88,12 @@ else() file(REMOVE_RECURSE ${OPENVINO_INSTALL_DIR}/lib/intel64) endif() +file(REMOVE_RECURSE ${THIRD_PARTY_PATH}/install/${OPENVINO_FILENAME}/docs) +file(REMOVE_RECURSE ${THIRD_PARTY_PATH}/install/${OPENVINO_FILENAME}/install_dependencies) +file(REMOVE_RECURSE ${THIRD_PARTY_PATH}/install/${OPENVINO_FILENAME}/samples) +file(REMOVE_RECURSE ${THIRD_PARTY_PATH}/install/${OPENVINO_FILENAME}/setupvars.sh) +file(REMOVE_RECURSE ${THIRD_PARTY_PATH}/install/${OPENVINO_FILENAME}/tools) + add_library(external_openvino STATIC IMPORTED GLOBAL) set_property(TARGET external_openvino PROPERTY IMPORTED_LOCATION ${OPENVINO_LIB})