onnxruntime/cmake/external/pybind11.cmake
Changming Sun 2d9dcc4576
Add python 3.9 support (#5874)
1. Add python 3.9 support(except Linux ARM)
2. Add Windows GPU python 3.8 to our packaging pipeline.
2020-11-30 12:02:48 -08:00

24 lines
595 B
CMake

if(onnxruntime_PREFER_SYSTEM_LIB)
find_package(pybind11)
endif()
if(NOT TARGET pybind11::module)
include(ExternalProject)
set(pybind11_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/pybind11/src/pybind11/include)
set(pybind11_URL https://github.com/pybind/pybind11.git)
set(pybind11_TAG v2.6.1)
ExternalProject_Add(pybind11
PREFIX pybind11
GIT_REPOSITORY ${pybind11_URL}
GIT_TAG ${pybind11_TAG}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
set(pybind11_dep pybind11)
else()
set(pybind11_lib pybind11::module)
endif()