mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +00:00
fix: make FindPython2 and FindPython3 work (#2662)
This commit is contained in:
parent
02746cb69f
commit
f8b8107b46
@ -144,11 +144,11 @@ if(DEFINED ${_Python}_VERSION AND ${_Python}_VERSION VERSION_LESS 3)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# In CMake 3.18+, you can find these separately, so include an if
|
# In CMake 3.18+, you can find these separately, so include an if
|
||||||
if(TARGET ${_Python}::${_Python})
|
if(TARGET ${_Python}::Python)
|
||||||
set_property(
|
set_property(
|
||||||
TARGET pybind11::embed
|
TARGET pybind11::embed
|
||||||
APPEND
|
APPEND
|
||||||
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::${_Python})
|
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::Python)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CMake 3.15+ has this
|
# CMake 3.15+ has this
|
||||||
|
Loading…
Reference in New Issue
Block a user