Relocatable OpenVINO Dev package improvements (#20461)
This commit is contained in:
parent
fb93638cb2
commit
00618a429b
@ -9,9 +9,7 @@ include(CMakeFindDependencyMacro)
|
|||||||
# Variables to export in plugin's projects
|
# Variables to export in plugin's projects
|
||||||
|
|
||||||
set(ov_options "@OV_OPTIONS@")
|
set(ov_options "@OV_OPTIONS@")
|
||||||
list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
|
list(APPEND ov_options CPACK_GENERATOR)
|
||||||
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
|
|
||||||
CMAKE_INSTALL_PREFIX CPACK_GENERATOR)
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND ov_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
|
list(APPEND ov_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||||
|
@ -28,6 +28,8 @@ if(NOT DEFINED OpenVINO_SOURCE_DIR)
|
|||||||
if(NOT EXISTS "${OpenVINO_BINARY_DIR}/cmake_install.cmake")
|
if(NOT EXISTS "${OpenVINO_BINARY_DIR}/cmake_install.cmake")
|
||||||
set(OpenVINODeveloperPackage_RELOCATABLE ON)
|
set(OpenVINODeveloperPackage_RELOCATABLE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(OpenVINO_SOURCE_DIR "${OpenVINOPython_SOURCE_DIR}/../../../")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED OpenVINODeveloperPackage_RELOCATABLE)
|
if(NOT DEFINED OpenVINODeveloperPackage_RELOCATABLE)
|
||||||
@ -154,8 +156,8 @@ endfunction()
|
|||||||
|
|
||||||
set(INIT_FILES_RUNTIME "${OpenVINOPython_SOURCE_DIR}/src/openvino/__init__.py"
|
set(INIT_FILES_RUNTIME "${OpenVINOPython_SOURCE_DIR}/src/openvino/__init__.py"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/__init__.py"
|
"${OpenVINOPython_SOURCE_DIR}/src/compatibility/openvino/__init__.py"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../tools/ovc/openvino/__init__.py"
|
"${OpenVINO_SOURCE_DIR}/tools/ovc/openvino/__init__.py"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../tools/benchmark_tool/openvino/__init__.py")
|
"${OpenVINO_SOURCE_DIR}/tools/benchmark_tool/openvino/__init__.py")
|
||||||
|
|
||||||
ov_check_init_files_alignment("${INIT_FILES_RUNTIME}")
|
ov_check_init_files_alignment("${INIT_FILES_RUNTIME}")
|
||||||
|
|
||||||
@ -319,15 +321,15 @@ macro(ov_define_setup_py_dependencies)
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/wheel/setup.py"
|
"${CMAKE_CURRENT_SOURCE_DIR}/wheel/setup.py"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/requirements.txt"
|
"${OpenVINOPython_SOURCE_DIR}/requirements.txt"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/wheel/readme.txt"
|
"${OpenVINOPython_SOURCE_DIR}/wheel/readme.txt"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../LICENSE"
|
"${OpenVINO_SOURCE_DIR}/LICENSE"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../licensing/onednn_third-party-programs.txt"
|
"${OpenVINO_SOURCE_DIR}/licensing/onednn_third-party-programs.txt"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../licensing/runtime-third-party-programs.txt"
|
"${OpenVINO_SOURCE_DIR}/licensing/runtime-third-party-programs.txt"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../licensing/tbb_third-party-programs.txt"
|
"${OpenVINO_SOURCE_DIR}/licensing/tbb_third-party-programs.txt"
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../docs/install_guides/pypi-openvino-rt.md")
|
"${OpenVINO_SOURCE_DIR}/docs/install_guides/pypi-openvino-rt.md")
|
||||||
|
|
||||||
if(wheel_pre_release)
|
if(wheel_pre_release)
|
||||||
list(APPEND ov_setup_py_deps
|
list(APPEND ov_setup_py_deps
|
||||||
"${OpenVINOPython_SOURCE_DIR}/../../../docs/install_guides/pre-release-note.md")
|
"${OpenVINO_SOURCE_DIR}/docs/install_guides/pre-release-note.md")
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -404,9 +406,8 @@ if(ENABLE_TESTS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(OpenVINODeveloperPackage_FOUND)
|
if(OpenVINODeveloperPackage_FOUND)
|
||||||
# TODO: understand whether it's required
|
|
||||||
# provides a callback function to describe each component in repo
|
# provides a callback function to describe each component in repo
|
||||||
include("${OpenVINOPython_SOURCE_DIR}/../../../cmake/packaging/packaging.cmake")
|
include("${OpenVINO_SOURCE_DIR}/cmake/packaging/packaging.cmake")
|
||||||
|
|
||||||
ov_cpack(${OV_CPACK_COMPONENTS_ALL})
|
ov_cpack(${OV_CPACK_COMPONENTS_ALL})
|
||||||
endif()
|
endif()
|
||||||
|
21
thirdparty/dependencies.cmake
vendored
21
thirdparty/dependencies.cmake
vendored
@ -266,26 +266,7 @@ if(NOT TARGET openvino::pugixml)
|
|||||||
function(ov_build_pugixml)
|
function(ov_build_pugixml)
|
||||||
function(ov_build_pugixml_static)
|
function(ov_build_pugixml_static)
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
function(install)
|
set(PUGIXML_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
cmake_parse_arguments(_install "" "EXPORT" "" ${ARGV})
|
|
||||||
if(_install_EXPORT STREQUAL "pugixml-targets")
|
|
||||||
# does nothing!
|
|
||||||
# we need to override 'export' command to prevent cmake issue with multiple
|
|
||||||
# export sets for pugixml-target. Currently, it's installed only by OpenVINO
|
|
||||||
else()
|
|
||||||
_install(${ARGV})
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
function(export)
|
|
||||||
cmake_parse_arguments(_export "" "EXPORT" "" ${ARGV})
|
|
||||||
if(_export_EXPORT STREQUAL "pugixml-targets")
|
|
||||||
# does nothing!
|
|
||||||
# we need to override 'export' command to prevent cmake issue with multiple
|
|
||||||
# export sets for pugixml-target. Currently, it's installed only by OpenVINO
|
|
||||||
else()
|
|
||||||
_export(${ARGV})
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
add_subdirectory(thirdparty/pugixml EXCLUDE_FROM_ALL)
|
add_subdirectory(thirdparty/pugixml EXCLUDE_FROM_ALL)
|
||||||
endfunction()
|
endfunction()
|
||||||
ov_build_pugixml_static()
|
ov_build_pugixml_static()
|
||||||
|
2
thirdparty/pugixml
vendored
2
thirdparty/pugixml
vendored
@ -1 +1 @@
|
|||||||
Subproject commit a0e064336317c9347a91224112af9933598714e9
|
Subproject commit 2e357d19a3228c0a301727aac6bea6fecd982d21
|
Loading…
Reference in New Issue
Block a user