No idea why pybind11 does not do it automatically. Maybe they think
that pybind11 can work (ie generate code) even if that code cannot be
compiled, but that's a bit ... strange.
# Python binding, generated with pybind11
set(PYBIND11_CPP_STANDARD -std=c++11)
find_package(pybind11)
# Python binding, generated with pybind11
set(PYBIND11_CPP_STANDARD -std=c++11)
find_package(pybind11)
+if(NOT PYTHONLIBS_FOUND)
+ set(pybind11_FOUND OFF)
+endif()
option(enable_python "Whether the Python bindings are activated." ${pybind11_FOUND}) # ON by default if dependencies are met
if(enable_python)
option(enable_python "Whether the Python bindings are activated." ${pybind11_FOUND}) # ON by default if dependencies are met
if(enable_python)