We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a675975 + 80a288f commit c36baafCopy full SHA for c36baaf
bindings/python/CMakeLists.txt
@@ -9,6 +9,22 @@ if( ${CMAKE_VERSION} LESS 3.12 )
9
include_directories(${Python_INCLUDE_DIRS})
10
set(HAKO_PYTHON_LIBS ${PYTHON_LIBRARIES})
11
else()
12
+ # check pyenv
13
+ execute_process(
14
+ COMMAND pyenv which python
15
+ RESULT_VARIABLE PYENV_FOUND
16
+ OUTPUT_VARIABLE PYENV_PYTHON_PATH
17
+ OUTPUT_STRIP_TRAILING_WHITESPACE
18
+ )
19
+
20
+ message(STATUS "PYENV_FOUND:${PYENV_FOUND}")
21
22
+ if(PYENV_FOUND EQUAL 0)
23
+ # if pyenv found, use pyenv python
24
+ set(Python_EXECUTABLE ${PYENV_PYTHON_PATH})
25
+ set(Python_ROOT_DIR ${PYENV_PYTHON_PATH})
26
+ endif()
27
28
find_package(Python COMPONENTS Interpreter Development)
29
30
set(HAKO_PYTHON_LIBS ${Python_LIBRARIES})
0 commit comments