We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cbf740 commit 6146a85Copy full SHA for 6146a85
CMakeLists.txt
@@ -305,14 +305,18 @@ if(BUILD_ONNX_PYTHON)
305
"${PYTHON_INCLUDE_DIR}")
306
307
# pybind11 is a header only lib
308
- find_package(pybind11)
+ find_package(pybind11 2.2)
309
if(pybind11_FOUND)
310
target_include_directories(onnx_cpp2py_export
311
PRIVATE ${pybind11_INCLUDE_DIRS})
312
else()
313
- target_include_directories(
314
- onnx_cpp2py_export
315
- PRIVATE ${ONNX_ROOT}/third_party/pybind11/include)
+ if(EXISTS ${ONNX_ROOT}/third_party/pybind11/include/pybind11/pybind11.h)
+ target_include_directories(
+ onnx_cpp2py_export
316
+ PRIVATE ${ONNX_ROOT}/third_party/pybind11/include)
317
+ else()
318
+ message(FATAL_ERROR "cannot find pybind")
319
+ endif()
320
endif()
321
322
if(APPLE)
0 commit comments