mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
fix(cmake): correct logic for FindPython
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
574ee0cac1
commit
adcf52c69e
@ -54,7 +54,7 @@ if(NOT Python_FOUND AND NOT Python3_FOUND)
|
|||||||
# If we are in submodule mode, export the Python targets to global targets.
|
# If we are in submodule mode, export the Python targets to global targets.
|
||||||
# If this behavior is not desired, FindPython _before_ pybind11.
|
# If this behavior is not desired, FindPython _before_ pybind11.
|
||||||
if(NOT is_config
|
if(NOT is_config
|
||||||
AND NOT Python_ARTIFACTS_INTERACTIVE
|
AND Python_ARTIFACTS_INTERACTIVE
|
||||||
AND _pybind11_global_keyword STREQUAL "")
|
AND _pybind11_global_keyword STREQUAL "")
|
||||||
if(TARGET Python::Python)
|
if(TARGET Python::Python)
|
||||||
set_property(TARGET Python::Python PROPERTY IMPORTED_GLOBAL TRUE)
|
set_property(TARGET Python::Python PROPERTY IMPORTED_GLOBAL TRUE)
|
||||||
|
Loading…
Reference in New Issue
Block a user