-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
triageNew bug, unverifiedNew bug, unverified
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
3.0.0
Problem description
When using find_package(Python COMPONENTS Interpreter)
before using find_package(pybind11)
, I get the following error:
CMake Error at /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:4064 (message):
Python_ADD_LIBRARY: dependent target 'Python::Module' is not defined.
Did you miss to request COMPONENT 'Development.Module'?
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/FindPython.cmake:635 (__Python_add_library)
/opt/ros/one/share/pybind11_catkin/cmake/pybind11NewTools.cmake:283 (python_add_library)
Obviously, the first call to find_package(Python)
should include the Development
component.
However, I don't have control about this find_package
call as it occurs in another upstream software package.
IMHO, pybind11
needs to ensure itself that all required components are find_packaged.
This issue is related to #3996, which identified an order dependency of find_package calls too.
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression
Metadata
Metadata
Assignees
Labels
triageNew bug, unverifiedNew bug, unverified