Commit 7fc4e886 authored by FPoupon's avatar FPoupon
Browse files

get the correct python interpreter

parent aaa6e33b
......@@ -73,6 +73,9 @@ set( CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/Modules
${CMAKE_MODULE_PATH} )
# Should be set to either "LEGACY" or "GLVND"
set( OpenGL_GL_PREFERENCE "LEGACY" )
find_package( Threads REQUIRED )
find_package( Boost REQUIRED )
find_package( JPEG REQUIRED )
......@@ -106,6 +109,14 @@ find_package( Wt QUIET )
find_package( OpenMP QUIET )
find_package( KOKKOS QUIET )
if( ${CMAKE_VERSION} VERSION_LESS "3.12.0" )
find_package( PythonInterp )
else()
find_package( Python COMPONENTS Interpreter )
set( PYTHON_EXECUTABLE ${Python_EXECUTABLE} )
endif()
message( STATUS "Python command : ${PYTHON_EXECUTABLE}" )
unset( NUITKA CACHE )
if( USE_NUITKA )
find_program( NUITKA nuitka )
......
......@@ -45,7 +45,8 @@ file( COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
set( TARGET_MODULE ${PROJECT_NAME}.so )
add_custom_command( OUTPUT ${TARGET_MODULE}
COMMAND python ${CMAKE_CURRENT_BINARY_DIR}/setup.py build
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_BINARY_DIR}/setup.py build
COMMAND ${CMAKE_COMMAND} -E copy
build/*/${TARGET_MODULE}
${TARGET_MODULE}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment