FindPython*: Add capability to control virtual env handling.

Fixes: #19097
This commit is contained in:
Marc Chevrier
2019-04-01 11:19:54 +02:00
parent 5ad73b608d
commit 8a2f62cc18
10 changed files with 198 additions and 20 deletions
@@ -0,0 +1,7 @@
set (Python3_FIND_VIRTUALENV STANDARD)
find_package (Python3 REQUIRED)
if (Python3_EXECUTABLE MATCHES "^${PYTHON3_VIRTUAL_ENV}/.+")
message (FATAL_ERROR "Python3 virtual env unexpectedly found.")
endif()