Rpath story (#20297)

This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2023-10-10 06:27:26 +02:00
1 parent bf9bdaa671
commit e30f75bb4d
34 files changed
+143 -95

No files matched your search

+4
View File
@@ -32,6 +32,10 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL
ov_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "OpenVINO C API Core Runtime library")
ov_set_apple_rpath(${TARGET_NAME}
# openvino_c installed in the same directory as openvino
${OV_CPACK_RUNTIMEDIR} ${OV_CPACK_RUNTIMEDIR})
# export
set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME runtime::c)
@@ -84,6 +84,10 @@ add_custom_command(TARGET ${TARGET_NAME}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/__init__.py
)
foreach(target IN LISTS INSTALLED_TARGETS)
ov_set_apple_rpath(${target} ${OV_CPACK_PYTHONDIR}/openvino/inference_engine ${OV_CPACK_RUNTIMEDIR})
endforeach()
# install
install(TARGETS ${INSTALLED_TARGETS}
@@ -68,6 +68,8 @@ if(OpenVINO_SOURCE_DIR)
)
endif()
ov_set_apple_rpath(_${PROJECT_NAME} ${OV_CPACK_PYTHONDIR} ${OV_CPACK_RUNTIMEDIR})
# Install
if(OpenVINO_SOURCE_DIR OR OpenVINODeveloperPackage_FOUND)
@@ -72,7 +72,7 @@ endif()
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(${PROJECT_NAME} PRIVATE
openvino::runtime::dev openvino::runtime ${OFFLINE_TRANSFORMATIONS_LIB})
openvino::core::dev openvino::runtime ${OFFLINE_TRANSFORMATIONS_LIB})
set_target_properties(${PROJECT_NAME} PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}
OUTPUT_NAME "_pyopenvino")
@@ -124,6 +124,13 @@ if(OpenVINO_SOURCE_DIR OR OpenVINODeveloperPackage_FOUND)
COMPONENT ${OV_CPACK_COMP_PYTHON_OPENVINO}_${pyversion}
${OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL})
ov_set_apple_rpath(${PROJECT_NAME} ${OV_CPACK_PYTHONDIR}/openvino
# path to OpenVINO C++ libraries
${OV_CPACK_RUNTIMEDIR}
# pyopenvino also depends on TBB because of:
# pyopenvino => openvino::offline_transformations => TBB optimized openvino::reference
${TBB_LIB_INSTALL_DIR})
ov_cpack_add_component(${OV_CPACK_COMP_OPENVINO_REQ_FILES} HIDDEN)
install(FILES ${OpenVINOPython_SOURCE_DIR}/requirements.txt
@@ -3,7 +3,6 @@
#include "pyopenvino/core/async_infer_queue.hpp"
#include <ie_common.h>
#include <pybind11/functional.h>
#include <pybind11/stl.h>
@@ -9,13 +9,12 @@
#include <pybind11/stl.h>
#include <pybind11/iostream.h>
#include <openvino/core/type/element_type.hpp>
#include <ngraph/runtime/shared_buffer.hpp>
#include <string>
#include <iterator>
#include <climits>
#include "Python.h"
#include "openvino/core/type/element_type.hpp"
#include "openvino/runtime/compiled_model.hpp"
#include "openvino/runtime/infer_request.hpp"
#include "openvino/runtime/tensor.hpp"
@@ -4,7 +4,6 @@
#include "pyopenvino/core/core.hpp"
#include <ie_extension.h>
#include <pybind11/stl.h>
#include <openvino/core/any.hpp>
@@ -3,7 +3,6 @@
#include "pyopenvino/core/infer_request.hpp"
#include <ie_common.h>
#include <pybind11/functional.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
@@ -25,7 +25,7 @@ function(frontend_module TARGET FRAMEWORK INSTALL_COMPONENT)
target_include_directories(${TARGET_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
"${OpenVINOPython_SOURCE_DIR}/src/pyopenvino/utils/")
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime openvino::runtime::dev openvino::frontend::${FRAMEWORK})
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime openvino::core::dev openvino::frontend::${FRAMEWORK})
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
@@ -39,8 +39,11 @@ function(frontend_module TARGET FRAMEWORK INSTALL_COMPONENT)
COMMAND ${CMAKE_COMMAND} -E copy ${OpenVINOPython_SOURCE_DIR}/src/openvino/frontend/${FRAMEWORK}/__init__.py
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/__init__.py)
set(frontend_install_path ${OV_CPACK_PYTHONDIR}/openvino/frontend/${FRAMEWORK})
install(TARGETS ${TARGET_NAME}
DESTINATION ${OV_CPACK_PYTHONDIR}/openvino/frontend/${FRAMEWORK}
DESTINATION ${frontend_install_path}
COMPONENT ${INSTALL_COMPONENT}
${OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL})
ov_set_apple_rpath(${TARGET_NAME} ${frontend_install_path} ${OV_CPACK_RUNTIMEDIR})
endfunction()
@@ -17,7 +17,6 @@
#include <vector>
#include "dict_attribute_visitor.hpp"
#include "ngraph/check.hpp"
#include "openvino/core/except.hpp"
#include "openvino/core/node.hpp"
#include "openvino/core/op_extension.hpp"