depot/third_party/nixpkgs/pkgs/development/python-modules/pybind11/setup-hook.sh
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

12 lines
386 B
Bash

# Tell the pybind11 CMake module where to find host platform Python. This is
# required when cross-compiling.
pybind11CMakeFlags () {
cmakeFlagsArray+=(
'-DPYBIND11_PYTHONLIBS_OVERWRITE=OFF'
'-DPYTHON_EXECUTABLE=@pythonInterpreter@'
'-DPYTHON_INCLUDE_DIR=@pythonIncludeDir@'
'-DPYTHON_SITE_PACKAGES=@pythonSitePackages@'
)
}
preConfigureHooks+=(pybind11CMakeFlags)