Setup minimum supported version for pybind11 (#15397)
This commit is contained in:
parent
4e064b02a0
commit
d092f5d7dd
@ -41,7 +41,7 @@ function(ov_check_python_build_conditions)
|
||||
if(EXISTS ${pybind11_tools_dir})
|
||||
list(APPEND CMAKE_MODULE_PATH ${pybind11_tools_dir})
|
||||
else()
|
||||
find_package(pybind11 QUIET)
|
||||
find_package(pybind11 2.8.0 QUIET)
|
||||
list(APPEND CMAKE_MODULE_PATH "${pybind11_DIR}")
|
||||
endif()
|
||||
# use libraries with the same version as python itself
|
||||
@ -161,7 +161,7 @@ endif()
|
||||
# Build the code
|
||||
#
|
||||
|
||||
find_package(pybind11 QUIET)
|
||||
find_package(pybind11 2.8.0 QUIET)
|
||||
|
||||
if(NOT pybind11_FOUND)
|
||||
add_subdirectory(thirdparty/pybind11 EXCLUDE_FROM_ALL)
|
||||
|
@ -28,9 +28,13 @@ set(PYBIND_FE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/mock_mo_python_api.cpp)
|
||||
|
||||
source_group("src" FILES ${PYBIND_FE_SRC})
|
||||
|
||||
add_subdirectory(${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pybind11_build
|
||||
EXCLUDE_FROM_ALL)
|
||||
find_package(pybind11 2.8.0 QUIET)
|
||||
|
||||
if(NOT pybind11_FOUND)
|
||||
add_subdirectory(${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pybind11_build
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
pybind11_add_module(${PYBIND_FE_NAME} MODULE NO_EXTRAS ${PYBIND_FE_SRC})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user