Small fixes after self-revew
This commit is contained in:
1 parent
e2f1595c21
commit
c203963548
4 files changed
+47
-29
No files matched your search
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
#
|
||||
# ov_cpack_set_dirs()
|
||||
# ov_debian_cpack_set_dirs()
|
||||
#
|
||||
# Set directories for cpack
|
||||
#
|
||||
|
||||
@@ -69,29 +69,34 @@ endif()
|
||||
# List of public OpenVINO components
|
||||
#
|
||||
|
||||
# core components
|
||||
set(OV_CPACK_COMP_CORE "core")
|
||||
set(OV_CPACK_COMP_CORE_C "core_c")
|
||||
set(OV_CPACK_COMP_CORE_DEV "core_dev")
|
||||
set(OV_CPACK_COMP_CORE_C_DEV "core_c_dev")
|
||||
# licensing
|
||||
set(OV_CPACK_COMP_LICENSING "licensing")
|
||||
# samples
|
||||
set(OV_CPACK_COMP_CPP_SAMPLES "cpp_samples")
|
||||
set(OV_CPACK_COMP_C_SAMPLES "c_samples")
|
||||
set(OV_CPACK_COMP_PYTHON_SAMPLES "python_samples")
|
||||
# python
|
||||
set(OV_CPACK_COMP_PYTHON_IE_API "pyie")
|
||||
set(OV_CPACK_COMP_PYTHON_NGRAPH "pyngraph")
|
||||
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
|
||||
# tools
|
||||
set(OV_CPACK_COMP_CORE_TOOLS "core_tools")
|
||||
set(OV_CPACK_COMP_DEV_REQ_FILES "openvino_dev_req_files")
|
||||
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER "deployment_manager")
|
||||
macro(ov_define_component_names)
|
||||
# core components
|
||||
set(OV_CPACK_COMP_CORE "core")
|
||||
set(OV_CPACK_COMP_CORE_C "core_c")
|
||||
set(OV_CPACK_COMP_CORE_DEV "core_dev")
|
||||
set(OV_CPACK_COMP_CORE_C_DEV "core_c_dev")
|
||||
# licensing
|
||||
set(OV_CPACK_COMP_LICENSING "licensing")
|
||||
# samples
|
||||
set(OV_CPACK_COMP_CPP_SAMPLES "cpp_samples")
|
||||
set(OV_CPACK_COMP_C_SAMPLES "c_samples")
|
||||
set(OV_CPACK_COMP_PYTHON_SAMPLES "python_samples")
|
||||
# python
|
||||
set(OV_CPACK_COMP_PYTHON_IE_API "pyie")
|
||||
set(OV_CPACK_COMP_PYTHON_NGRAPH "pyngraph")
|
||||
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
|
||||
# tools
|
||||
set(OV_CPACK_COMP_CORE_TOOLS "core_tools")
|
||||
set(OV_CPACK_COMP_DEV_REQ_FILES "openvino_dev_req_files")
|
||||
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER "deployment_manager")
|
||||
endmacro()
|
||||
|
||||
ov_define_component_names()
|
||||
|
||||
# Include Debian specific configuration file:
|
||||
# - overrides directories set by ov_cpack_set_dirs()
|
||||
# - merges some components
|
||||
# - overrides directories set by ov_debian_cpack_set_dirs()
|
||||
# - merges some components using ov_override_component_names()
|
||||
# - sets ov_debian_specific_settings()
|
||||
if(CPACK_GENERATOR STREQUAL "DEB")
|
||||
include(packaging/debian)
|
||||
endif()
|
||||
|
||||
@@ -64,11 +64,9 @@ install(FILES cpp/CMakeLists.txt
|
||||
|
||||
# install Python samples
|
||||
|
||||
if(ENABLE_PYTHON)
|
||||
ie_cpack_add_component(${OV_CPACK_COMP_PYTHON_SAMPLES})
|
||||
ie_cpack_add_component(${OV_CPACK_COMP_PYTHON_SAMPLES})
|
||||
|
||||
install(DIRECTORY python/
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/python
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT ${OV_CPACK_COMP_PYTHON_SAMPLES})
|
||||
endif()
|
||||
install(DIRECTORY python/
|
||||
DESTINATION ${OV_CPACK_SAMPLESDIR}/python
|
||||
USE_SOURCE_PERMISSIONS
|
||||
COMPONENT ${OV_CPACK_COMP_PYTHON_SAMPLES})
|
||||
@@ -54,6 +54,21 @@ trap 'error ${LINENO}' ERR
|
||||
|
||||
SAMPLES_PATH="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )"
|
||||
|
||||
printf "\nSetting environment variables for building samples...\n"
|
||||
|
||||
if [ -z "$INTEL_OPENVINO_DIR" ]; then
|
||||
if [ -e "$SAMPLES_PATH/../../setupvars.sh" ]; then
|
||||
setvars_path="$SAMPLES_PATH/../../setupvars.sh"
|
||||
else
|
||||
printf "Error: Failed to set the environment variables automatically. To fix, run the following command:\n source <INSTALL_DIR>/setupvars.sh\n where INSTALL_DIR is the OpenVINO installation directory.\n\n"
|
||||
exit 1
|
||||
fi
|
||||
source "$setvars_path" || true
|
||||
else
|
||||
# case for run with `sudo -E`
|
||||
source "$INTEL_OPENVINO_DIR/setupvars.sh" || true
|
||||
fi
|
||||
|
||||
if ! command -v cmake &>/dev/null; then
|
||||
printf "\n\nCMAKE is not installed. It is required to build OpenVINO Runtime samples. Please install it. \n\n"
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user