1 function(_Pybind11_import)
2 nnas_find_package(Pybind11Source QUIET)
4 if(NOT Pybind11Source_FOUND)
5 set(Pybind11_FOUND FALSE PARENT_SCOPE)
7 endif(NOT Pybind11Source_FOUND)
9 nnas_include(ExternalBuildTools)
10 ExternalBuild_CMake(CMAKE_DIR ${Pybind11Source_DIR}
11 BUILD_DIR ${CMAKE_BINARY_DIR}/externals/PYBIND11/build
12 INSTALL_DIR ${EXT_OVERLAY_DIR}
15 EXTRA_OPTS "-DPYBIND11_TEST:BOOL=OFF")
17 find_path(Pybind11_INCLUDE_DIRS NAMES pybind11.h PATHS ${EXT_OVERLAY_DIR} PATH_SUFFIXES include/pybind11)
19 set(Pybind11_FOUND TRUE PARENT_SCOPE)
20 endfunction(_Pybind11_import)