2023-01-16 11:02:17 +04:00
|
|
|
# Copyright (C) 2018-2023 Intel Corporation
|
2021-06-30 18:15:41 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Shellcheck
|
|
|
|
|
#
|
|
|
|
|
|
2022-08-14 20:53:41 +04:00
|
|
|
set(shellcheck_skip_list
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/bin"
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/build"
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/thirdparty"
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_cpu/thirdparty"
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_gpu/thirdparty"
|
|
|
|
|
"${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11"
|
|
|
|
|
"${TEMP}")
|
|
|
|
|
|
2021-07-02 11:36:31 +03:00
|
|
|
ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}"
|
2022-08-14 20:53:41 +04:00
|
|
|
SKIP ${shellcheck_skip_list})
|
2021-06-30 18:15:41 +03:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# cpack
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# install setupvars
|
|
|
|
|
|
2023-04-24 14:48:45 +04:00
|
|
|
ov_cpack_add_component(${OV_CPACK_COMP_SETUPVARS} HIDDEN)
|
2021-06-30 18:15:41 +03:00
|
|
|
|
|
|
|
|
if(UNIX)
|
2023-03-08 20:00:30 +04:00
|
|
|
set(_setupvars_file_full_path "${CMAKE_CURRENT_SOURCE_DIR}/setupvars/setupvars.sh")
|
2021-06-30 18:15:41 +03:00
|
|
|
elseif(WIN32)
|
2023-03-08 20:00:30 +04:00
|
|
|
set(_setupvars_file "setupvars/setupvars.bat")
|
|
|
|
|
set(_setupvars_file_full_path "${CMAKE_CURRENT_SOURCE_DIR}/${_setupvars_file}")
|
2023-03-05 10:46:53 +04:00
|
|
|
if(USE_BUILD_TYPE_SUBFOLDER AND CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release)$")
|
2021-12-23 18:14:27 +03:00
|
|
|
# Patch primary configuration in setupvars.bat which is "Release" by default.
|
|
|
|
|
# Note setupvars secondary configuration is always "Debug".
|
2023-03-08 20:00:30 +04:00
|
|
|
message(STATUS "Patching content of ${_setupvars_file_full_path} for CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
|
|
|
|
|
file(READ "${_setupvars_file_full_path}" _setupvars_content)
|
2021-12-23 18:14:27 +03:00
|
|
|
string(REPLACE "Release" ${CMAKE_BUILD_TYPE} _setupvars_content "${_setupvars_content}")
|
2023-03-08 20:00:30 +04:00
|
|
|
set(_setupvars_file_full_path "${OpenVINO_BINARY_DIR}/${_setupvars_file}")
|
|
|
|
|
message(STATUS "Writing patched content to ${_setupvars_file_full_path}")
|
|
|
|
|
file(WRITE "${_setupvars_file_full_path}" "${_setupvars_content}")
|
2021-12-23 18:14:27 +03:00
|
|
|
endif()
|
2021-06-30 18:15:41 +03:00
|
|
|
endif()
|
2022-07-19 10:07:26 +04:00
|
|
|
|
2023-03-08 20:00:30 +04:00
|
|
|
install(PROGRAMS "${_setupvars_file_full_path}"
|
2021-12-23 18:14:27 +03:00
|
|
|
DESTINATION .
|
2022-07-19 10:07:26 +04:00
|
|
|
COMPONENT ${OV_CPACK_COMP_SETUPVARS})
|
2021-06-30 18:15:41 +03:00
|
|
|
|
|
|
|
|
# install install_dependencies
|
|
|
|
|
|
2022-02-16 12:52:57 +03:00
|
|
|
if(LINUX)
|
2023-04-24 14:48:45 +04:00
|
|
|
ov_cpack_add_component(${OV_CPACK_COMP_INSTALL_DEPENDENCIES} HIDDEN)
|
2022-07-27 14:04:22 +04:00
|
|
|
|
2023-03-05 10:46:53 +04:00
|
|
|
install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/install_dependencies/install_openvino_dependencies.sh"
|
|
|
|
|
DESTINATION install_dependencies/
|
|
|
|
|
COMPONENT ${OV_CPACK_COMP_INSTALL_DEPENDENCIES})
|
2021-06-30 18:15:41 +03:00
|
|
|
endif()
|