From 99e443341417fa00a5c15fc9e75c8f27896b23f5 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 22 Mar 2022 14:15:36 +0100 Subject: Pass the python executable to gn This way the python scripts configured by gn_configure will use the same python version detected by the initial configure_submodule. This is useful when configuring separately and under different environment than the build itself, and the different python executables possibly used in the two phases cause issues, like modules not found. Change-Id: Iab7cc48c2bb4f8c7fb4af7965c1183388a53527b Reviewed-by: Michal Klocek (cherry picked from commit 8fd6601ef64dc22e48ec9c14440262f88d82cd4e) Reviewed-by: Qt CI Bot --- cmake/Functions.cmake | 1 + cmake/Gn.cmake | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index 320a84a21..5da96d2f1 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -1103,6 +1103,7 @@ function(add_gn_command) -DSOURCE_DIR=${CMAKE_CURRENT_LIST_DIR} -DMODULE=${arg_MODULE} -DQT_HOST_GN_PATH=${QT_HOST_GN_PATH} + -DPython2_EXECUTABLE=${Python2_EXECUTABLE} -P ${WEBENGINE_ROOT_SOURCE_DIR}/cmake/Gn.cmake WORKING_DIRECTORY ${WEBENGINE_ROOT_BUILD_DIR} COMMENT "Run gn for target ${arg_CMAKE_TARGET} in ${arg_BUILDDIR}" diff --git a/cmake/Gn.cmake b/cmake/Gn.cmake index b4adc1bd3..399115611 100644 --- a/cmake/Gn.cmake +++ b/cmake/Gn.cmake @@ -15,7 +15,6 @@ include(${WEBENGINE_ROOT_SOURCE_DIR}/cmake/Functions.cmake) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) find_package(Gn ${QT_REPO_MODULE_VERSION} EXACT) -find_package(Python2 2.7.5 REQUIRED) set(gnCmd ${Gn_EXECUTABLE}) set(buildDir ${BUILD_DIR}) -- cgit v1.2.1