Skip to content

Commit f8b8107

Browse files
authored
fix: make FindPython2 and FindPython3 work (#2662)
1 parent 02746cb commit f8b8107

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/pybind11NewTools.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ if(DEFINED ${_Python}_VERSION AND ${_Python}_VERSION VERSION_LESS 3)
144144
endif()
145145

146146
# In CMake 3.18+, you can find these separately, so include an if
147-
if(TARGET ${_Python}::${_Python})
147+
if(TARGET ${_Python}::Python)
148148
set_property(
149149
TARGET pybind11::embed
150150
APPEND
151-
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::${_Python})
151+
PROPERTY INTERFACE_LINK_LIBRARIES ${_Python}::Python)
152152
endif()
153153

154154
# CMake 3.15+ has this

0 commit comments

Comments
 (0)