!19165 fix cmake find python

Merge pull request !19165 from zhoufeng/cmake-find-python
This commit is contained in:
i-robot 2021-07-02 08:44:53 +00:00 committed by Gitee
commit a75b8e2b4e
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ endfunction()
## find python, quit if the found python is static
set(Python3_USE_STATIC_LIBS FALSE)
set(Python3_FIND_VIRTUALENV ONLY)
find_package(Python3 COMPONENTS Interpreter Development)
if(Python3_FOUND)
message("Python3 found, version: ${Python3_VERSION}")