From 63c9356544ccd1471e3c428f21662420c0ceb00b Mon Sep 17 00:00:00 2001 From: Marc Chevrier Date: Tue, 2 Oct 2018 11:09:45 +0200 Subject: FindPython*: fix erroneous handling of virtual environments fixes: #18408 --- Modules/FindPython.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Modules/FindPython.cmake') diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake index 0bf0b4f582..8645a0db59 100644 --- a/Modules/FindPython.cmake +++ b/Modules/FindPython.cmake @@ -135,6 +135,12 @@ Hints Value ``ONLY`` is not supported so ``FIRST`` will be used instead. +.. note:: + + If a Python virtual environment is configured, set variable + ``Python_FIND_REGISTRY`` (Windows) or ``CMAKE_FIND_FRAMEWORK`` (macOS) with + value ``LAST`` or ``NEVER`` to select it preferably. + Commands ^^^^^^^^ -- cgit v1.2.1