Files
openvino/tools/openvino_dev/CMakeLists.txt
T
Sergey Lyubimtsev 6c3e68a8d1 Add openvino-dev wheel build from opensource (#8174)
* Add openvino-dev wheel build from opensource

* fix path to OMZ tools

* fix for working directory

* change order

* pull out requirements to requirements.txt for snyk scans

* fix patterns

* fix patterns

* fix AttributeError: : 'PosixPath' object has no attribute 'startswith'
2021-11-09 14:37:17 +03:00

23 lines
992 B
CMake

# Copyright (C) 2018-2021 Intel Corporation
# 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(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")
set(openvino_wheel_name "openvino_dev-${WHEEL_VERSION}-${WHEEL_BUILD}-py3-none-any.whl")
set(openvino_wheels_output_dir "${CMAKE_BINARY_DIR}/wheels")
set(openvino_wheel_path "${openvino_wheels_output_dir}/${openvino_wheel_name}")
add_custom_command(OUTPUT ${openvino_wheel_path}
COMMAND ${CMAKE_COMMAND} -E env OPENVINO_VERSION=${WHEEL_VERSION}
${PYTHON_EXECUTABLE} ${SETUP_PY} clean bdist_wheel
--dist-dir ${openvino_wheels_output_dir}
--build=${WHEEL_BUILD}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Building Python wheel ${openvino_wheel_name}"
VERBATIM)
add_custom_target(openvino_dev_wheel ALL DEPENDS ${openvino_wheel_path})