Index: scripts/CMakeLists.txt =================================================================== --- scripts/CMakeLists.txt +++ scripts/CMakeLists.txt @@ -19,7 +19,8 @@ # Install the LLDB python module on all operating systems (except Windows) if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") - install(SCRIPT lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\") + configure_file(lldb_python_module.cmake ${CMAKE_CURRENT_BINARY_DIR}/lldb_python_module.cmake @ONLY) + install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/lldb_python_module.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" -DCMAKE_BUILD_DIR=\"${CMAKE_BUILD_DIR}\" -DPYTHON_EXECUTABLE=\"${PYTHON_EXECUTABLE}\") endif() # build Python modules Index: scripts/lldb_python_module.cmake =================================================================== --- scripts/lldb_python_module.cmake +++ scripts/lldb_python_module.cmake @@ -1,6 +1,8 @@ # This CMake script installs the LLDB python module from the build directory # to the install directory. +SET(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@") + # FIXME: if a non-standard version of python is requested, the cmake macro # below will need Python_ADDITIONAL_VERSIONS set in order to find it. include(FindPythonInterp)