Lines 75-80
Link Here
|
75 |
else() |
75 |
else() |
76 |
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) |
76 |
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) |
77 |
endif() |
77 |
endif() |
|
|
78 |
|
79 |
if (CMAKE_BUILD_TYPE STREQUAL Gentoo) |
80 |
set(_Python_NAMES python) |
81 |
endif() |
82 |
|
78 |
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) |
83 |
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) |
79 |
|
84 |
|
80 |
# Set up the versions we know about, in the order we will search. Always add |
85 |
# Set up the versions we know about, in the order we will search. Always add |
Lines 99-110
Link Here
|
99 |
unset(_PYTHON3_VERSIONS) |
104 |
unset(_PYTHON3_VERSIONS) |
100 |
|
105 |
|
101 |
# Search for newest python version if python executable isn't found |
106 |
# Search for newest python version if python executable isn't found |
102 |
if(NOT PYTHON_EXECUTABLE) |
107 |
if(NOT PYTHON_EXECUTABLE AND NOT CMAKE_BUILD_TYPE STREQUAL Gentoo) |
103 |
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) |
108 |
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) |
104 |
set(_Python_NAMES python${_CURRENT_VERSION}) |
109 |
set(_Python_NAMES python${_CURRENT_VERSION}) |
105 |
if(WIN32) |
110 |
if(WIN32) |
106 |
list(APPEND _Python_NAMES python) |
111 |
list(APPEND _Python_NAMES python) |
107 |
endif() |
112 |
endif() |
|
|
113 |
|
108 |
find_program(PYTHON_EXECUTABLE |
114 |
find_program(PYTHON_EXECUTABLE |
109 |
NAMES ${_Python_NAMES} |
115 |
NAMES ${_Python_NAMES} |
110 |
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] |
116 |
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] |