CMake target missing Python in CONFIG mode #4309
Unanswered
mablanchard
asked this question in
Q&A
Replies: 1 comment
-
Possible workaround could be, with CMake >= 3.24.0 to enforce |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Looking for pybind11 in CMake
CONFIG
mode multiple times from separate directories doesn't seem to produce the same targets. InFindPython
mode, the following snippet:Gives from first execution in the first directory the expected:
But later gives, from the second execution in another directory, the unexpected (
Python::Python
missing) :From
pybind11Common.cmake
comments, pybind11 CMake script shall declare regular (ie. non-global) targets. It seems likepybind11NewTools.cmake
is using a global include guard though, which explains why the secondpybind11::embed
targets does not get linked withPython::Python
...Beta Was this translation helpful? Give feedback.
All reactions