Self-review
This commit is contained in:
parent
df794a493a
commit
de9cb7c102
@ -69,7 +69,6 @@ set(OV_COMP_PYTHON_NGRAPH "pyngraph")
|
||||
set(OV_COMP_PYTHON_OPENVINO "pyopenvino")
|
||||
set(OV_COMP_DEV_REQ_FILES "openvino_dev_req_files")
|
||||
set(OV_COMP_LICENSING "licensing")
|
||||
set(OV_COMP_INSTALL_DEPENDENCIES "install_dependencies")
|
||||
|
||||
# override cpack components name for DEB cpack generator
|
||||
if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
@ -89,8 +88,6 @@ if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
set(OV_COMP_CORE_TOOLS "${OV_COMP_CORE_DEV}")
|
||||
# move licensing to core
|
||||
set(OV_COMP_LICENSING "${OV_COMP_CORE}")
|
||||
# move install_dependencies to core as well
|
||||
set(OV_COMP_INSTALL_DEPENDENCIES "${OV_COMP_CORE}")
|
||||
endif()
|
||||
|
||||
macro(ie_cpack)
|
||||
|
@ -88,9 +88,9 @@ function(ie_add_plugin)
|
||||
endif()
|
||||
|
||||
# new OpenVINO Developer Package
|
||||
# if(TARGET openvino::runtime::dev)
|
||||
if(TARGET openvino::runtime::dev)
|
||||
target_link_libraries(${IE_PLUGIN_NAME} PRIVATE openvino::runtime openvino::runtime::dev)
|
||||
# endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${IE_PLUGIN_NAME} PROPERTIES COMPILE_PDB_NAME ${IE_PLUGIN_NAME})
|
||||
@ -147,8 +147,6 @@ function(ie_add_plugin)
|
||||
ie_cpack_add_component(${install_component} REQUIRED DEPENDS core)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# TODO: install for openvino<ver> folder for side by side installation
|
||||
# since the plugins (CMake MODULEs) cannot be versioned
|
||||
install(TARGETS ${IE_PLUGIN_NAME}
|
||||
LIBRARY DESTINATION ${IE_CPACK_PLUGIN_PATH}
|
||||
COMPONENT ${install_component})
|
||||
|
@ -146,15 +146,26 @@ endfunction()
|
||||
set(_ov_package_prefix_dir "${PACKAGE_PREFIX_DIR}")
|
||||
|
||||
set(THREADING "@THREADING@")
|
||||
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND AND OFF)
|
||||
# TODO: find system TBB instead of custom one
|
||||
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND)
|
||||
set_and_check(_tbb_dir "@PACKAGE_IE_TBB_DIR@")
|
||||
_ov_find_dependency(TBB
|
||||
COMPONENTS tbb tbbmalloc
|
||||
CONFIG
|
||||
PATHS ${TBBROOT}/cmake
|
||||
${_tbb_dir}
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
if(_tbb_dir)
|
||||
# TBB is located in OpenVINO package
|
||||
_ov_find_dependency(TBB
|
||||
COMPONENTS tbb tbbmalloc
|
||||
CONFIG
|
||||
PATHS
|
||||
# TBB is specified via TBBROOT CMake variable
|
||||
${TBBROOT}/cmake
|
||||
# TBB is searched in OV Package location
|
||||
${_tbb_dir}
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
else()
|
||||
# OpenVINO is built against system TBB
|
||||
_ov_find_dependency(TBB
|
||||
COMPONENTS tbb tbbmalloc)
|
||||
endif()
|
||||
|
||||
set(install_tbbbind "@install_tbbbind@")
|
||||
if(install_tbbbind)
|
||||
|
@ -26,41 +26,40 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}"
|
||||
# cpack
|
||||
#
|
||||
|
||||
if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
# Note: skip all dependencies scripts in Debian package mode
|
||||
# This is not native for Debian and we have thoughts to convert
|
||||
# such scripts to documentation "Post-Install steps" / "Configure devices"
|
||||
return()
|
||||
endif()
|
||||
|
||||
# install setupvars
|
||||
|
||||
if(NOT CPACK_GENERATOR STREQUAL "DEB")
|
||||
ie_cpack_add_component(setupvars REQUIRED)
|
||||
ie_cpack_add_component(setupvars REQUIRED)
|
||||
|
||||
if(UNIX)
|
||||
set(_setupvars_file setupvars/setupvars.sh)
|
||||
elseif(WIN32)
|
||||
set(_setupvars_file setupvars/setupvars.bat)
|
||||
if (USE_BUILD_TYPE_SUBFOLDER AND CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
# Patch primary configuration in setupvars.bat which is "Release" by default.
|
||||
# Note setupvars secondary configuration is always "Debug".
|
||||
file(READ "${_setupvars_file}" _setupvars_content)
|
||||
string(REPLACE "Release" ${CMAKE_BUILD_TYPE} _setupvars_content "${_setupvars_content}")
|
||||
set(_setupvars_file "${CMAKE_BINARY_DIR}/${_setupvars_file}")
|
||||
file(WRITE "${_setupvars_file}" "${_setupvars_content}")
|
||||
endif()
|
||||
if(UNIX)
|
||||
set(_setupvars_file setupvars/setupvars.sh)
|
||||
elseif(WIN32)
|
||||
set(_setupvars_file setupvars/setupvars.bat)
|
||||
if (USE_BUILD_TYPE_SUBFOLDER AND CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE EQUAL "Debug")
|
||||
# Patch primary configuration in setupvars.bat which is "Release" by default.
|
||||
# Note setupvars secondary configuration is always "Debug".
|
||||
file(READ "${_setupvars_file}" _setupvars_content)
|
||||
string(REPLACE "Release" ${CMAKE_BUILD_TYPE} _setupvars_content "${_setupvars_content}")
|
||||
set(_setupvars_file "${CMAKE_BINARY_DIR}/${_setupvars_file}")
|
||||
file(WRITE "${_setupvars_file}" "${_setupvars_content}")
|
||||
endif()
|
||||
|
||||
install(PROGRAMS "${_setupvars_file}"
|
||||
DESTINATION .
|
||||
COMPONENT setupvars)
|
||||
endif()
|
||||
install(PROGRAMS "${_setupvars_file}"
|
||||
DESTINATION .
|
||||
COMPONENT setupvars)
|
||||
|
||||
# install install_dependencies
|
||||
|
||||
if(UNIX)
|
||||
if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
set(deb_exclude PATTERN "install_dependencies/install_openvino_dependencies.sh" EXCLUDE)
|
||||
endif()
|
||||
|
||||
ie_cpack_add_component(${OV_COMP_INSTALL_DEPENDENCIES} REQUIRED)
|
||||
ie_cpack_add_component(install_dependencies REQUIRED)
|
||||
install(DIRECTORY install_dependencies/
|
||||
DESTINATION share/openvino${OpenVINO_VERSION}/install_dependencies
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT ${OV_COMP_INSTALL_DEPENDENCIES}
|
||||
${deb_exclude})
|
||||
DESTINATION install_dependencies
|
||||
COMPONENT install_dependencies
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
endif()
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
set(PYTHON_VERSION python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
set(WHEEL_VERSION "${IE_VERSION}" CACHE STRING "Version of this release" FORCE)
|
||||
set(WHEEL_BUILD "${IE_VERSION_BUILD}" CACHE STRING "Build number of this release" FORCE)
|
||||
set(WHEEL_VERSION "${OpenVINO_VERSION}" CACHE STRING "Version of this release" FORCE)
|
||||
set(WHEEL_BUILD "${OpenVINO_VERSION_BUILD}" CACHE STRING "Build number of this release" FORCE)
|
||||
set(PYTHON_BRIDGE_CPACK_PATH "python")
|
||||
set(PY_PACKAGES_DIR ${PYTHON_BRIDGE_CPACK_PATH}/${PYTHON_VERSION})
|
||||
set(TBB_LIBS_DIR runtime/3rdparty/tbb/lib)
|
||||
|
@ -25,9 +25,9 @@ endif()
|
||||
# outbound requirements.txt files for openvino-dev package
|
||||
|
||||
if (DEFINED ENV{CI_BUILD_DEV_TAG} AND NOT $ENV{CI_BUILD_DEV_TAG} STREQUAL "")
|
||||
set(WHEEL_VERSION "${IE_VERSION}.$ENV{CI_BUILD_DEV_TAG}")
|
||||
set(WHEEL_VERSION "${OpenVINO_VERSION}.$ENV{CI_BUILD_DEV_TAG}")
|
||||
else()
|
||||
set(WHEEL_VERSION ${IE_VERSION})
|
||||
set(WHEEL_VERSION ${OpenVINO_VERSION})
|
||||
endif()
|
||||
|
||||
set(REQUIREMENTS_IN "${CMAKE_CURRENT_SOURCE_DIR}/requirements_dev.in")
|
||||
|
@ -2,8 +2,8 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set(WHEEL_VERSION "${IE_VERSION}" CACHE STRING "Version of this release" FORCE)
|
||||
set(WHEEL_BUILD "${IE_VERSION_BUILD}" CACHE STRING "Build number of this release" FORCE)
|
||||
set(WHEEL_VERSION "${OpenVINO_VERSION}" CACHE STRING "Version of this release" FORCE)
|
||||
set(WHEEL_BUILD "${OpenVINO_VERSION_BUILD}" CACHE STRING "Build number of this release" FORCE)
|
||||
set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")
|
||||
|
||||
set(openvino_wheel_name "openvino_dev-${WHEEL_VERSION}-${WHEEL_BUILD}-py3-none-any.whl")
|
||||
|
Loading…
Reference in New Issue
Block a user