Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.9.1, master
Problem description
Using the new FindPython mode but the old pybind11_add_module, I get the following error:
Errors << py_binding_tools:cmake /homes/rhaschke/src/ros/logs/py_binding_tools/build.cmake.000.log
CMake Error at /usr/lib/cmake/pybind11/pybind11NewTools.cmake:205 (python_add_library):
Unknown CMake command "python_add_library".
Call Stack (most recent call first):
/opt/ros/one/share/pybind11_catkin/cmake/pybind11_catkin.cmake:27 (pybind11_add_module)
CMakeLists.txt:44 (pybind_add_module)
The cmake function python_add_library was renamed to Python_add_library and I think, the corresponding calls in pybind11NewTools.cmake should be adapted accordingly:
|
python_add_library(${target_name} ${lib_type} ${ARG_UNPARSED_ARGUMENTS}) |
However, I'm surprised that I am the first running into that issue. Maybe I'm missing something else?
Reproducible example code
find_package(Python 3 REQUIRED)
find_package(pybind11 REQUIRED)
pybind11_add_module(py_binding_tools_module src/py_binding_tools.cpp)
Is this a regression? Put the last known working version here if it is.
Not a regression
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.9.1, master
Problem description
Using the new
FindPythonmode but the oldpybind11_add_module, I get the following error:The cmake function
python_add_librarywas renamed toPython_add_libraryand I think, the corresponding calls inpybind11NewTools.cmakeshould be adapted accordingly:pybind11/tools/pybind11NewTools.cmake
Line 262 in 741d86f
However, I'm surprised that I am the first running into that issue. Maybe I'm missing something else?
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression