Skip to content

Commit

Permalink
use openvino from wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
mryzhov committed Jun 19, 2024
1 parent 0dcc805 commit dd5a49f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ project(openvino_tokenizers

include(cmake/platforms.cmake)

# Looking for OpenVINO in the python distribution
find_package(Python3 REQUIRED)
execute_process(
COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')"
RESULT_VARIABLE result
OUTPUT_VARIABLE OpenVINO_DIR_PY
ERROR_QUIET
)
if(OpenVINO_DIR_PY AND NOT OpenVINO_DIR)
message(STATUS "Use OpenVINO from python package: ${OpenVINO_DIR_PY}")
set(OpenVINO_DIR ${OpenVINO_DIR_PY} CACHE PATH "" FORCE)
endif()

# Find OpenVINODeveloperPackage first to compile with SDL flags
find_package(OpenVINODeveloperPackage QUIET
PATHS "${OpenVINO_DIR}")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ python_abi = "none"
[build-system]
requires = [
"py-build-cmake@git+https://github.com/tttapa/py-build-cmake@7ab73da351c7140f06d727a8705bece4cf544cd9",
"cmake~=3.15"
"cmake~=3.15",
"openvino~=2024.3.0.0.dev"
]
build-backend = "py_build_cmake.build"

0 comments on commit dd5a49f

Please sign in to comment.