Commit f8b8107b by Frank Committed by GitHub

fix: make FindPython2 and FindPython3 work (#2662)

parent 02746cb6
......@@ -144,11 +144,11 @@ if(DEFINED ${_Python}_VERSION AND ${_Python}_VERSION VERSION_LESS 3)
endif()
# In CMake 3.18+, you can find these separately, so include an if
if(TARGET ${_Python}::${_Python})
if(TARGET ${_Python}::Python)
set_property(
TARGET pybind11::embed
APPEND
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::${_Python})
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::Python)
endif()
# CMake 3.15+ has this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment