xref: /aosp_15_r20/external/pytorch/cmake/Modules/Findpybind11.cmake (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1# Try to find the pybind11 library and headers.
2#  pybind11_FOUND        - system has pybind11
3#  pybind11_INCLUDE_DIRS - the pybind11 include directory
4
5find_path(pybind11_INCLUDE_DIR
6        NAMES pybind11/pybind11.h
7        DOC "The directory where pybind11 includes reside"
8)
9
10set(pybind11_INCLUDE_DIRS ${pybind11_INCLUDE_DIR})
11
12include(FindPackageHandleStandardArgs)
13find_package_handle_standard_args(pybind11
14        FOUND_VAR pybind11_FOUND
15        REQUIRED_VARS pybind11_INCLUDE_DIR
16)
17
18mark_as_advanced(pybind11_FOUND)
19