Skip to content

Commit 44274f3

Browse files
authored
Update pybind11Common.cmake
1 parent 55153bb commit 44274f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/pybind11Common.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,13 @@ endif()
173173
# Check to see which Python mode we are in, new, old, or no python
174174
if(PYBIND11_NOPYTHON)
175175
set(_pybind11_nopython ON)
176+
# We won't use new FindPython if PYBIND11_FINDPYTHON is defined and falselike
177+
# Otherwise, we use if FindPythonLibs is missing or if FindPython was already used
176178
elseif(
177-
NOT (DEFINED PYBIND11_FINDPYTHON AND NOT PYBIND11_FINDPYTHON)
179+
(NOT DEFINED PYBIND11_FINDPYTHON OR PYBIND11_FINDPYTHON)
178180
AND (_pybind11_missing_old_python STREQUAL "NEW"
179181
OR PYBIND11_FINDPYTHON
180182
OR Python_FOUND
181-
OR Python2_FOUND
182183
OR Python3_FOUND
183184
))
184185

0 commit comments

Comments
 (0)