microsoft/onnxruntime-extensions
Publicmirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable
cmake/externals/pybind11.cmake
19lines · modecode
| 1 | if(NOT TARGET pybind11::module) |
| 2 | include(ExternalProject) |
| 3 | |
| 4 | set(pybind11_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/pybind11/src/pybind11/include) |
| 5 | set(pybind11_URL https://github.com/pybind/pybind11.git) |
| 6 | set(pybind11_TAG v2.4.0) |
| 7 | |
| 8 | ExternalProject_Add(pybind11 |
| 9 | PREFIX pybind11 |
| 10 | GIT_REPOSITORY ${pybind11_URL} |
| 11 | GIT_TAG ${pybind11_TAG} |
| 12 | CONFIGURE_COMMAND "" |
| 13 | BUILD_COMMAND "" |
| 14 | INSTALL_COMMAND "" |
| 15 | ) |
| 16 | set(pybind11_dep pybind11) |
| 17 | else() |
| 18 | set(pybind11_lib pybind11::module) |
| 19 | endif() |
| 20 | |