summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2022-03-22 14:15:36 +0100
committerDimitrios Apostolou <jimis@qt.io>2022-03-23 12:14:29 +0100
commit8fd6601ef64dc22e48ec9c14440262f88d82cd4e (patch)
tree4c42c56d15cf06232e7b8ce614fd8f256903e2fc /cmake
parent596d56072e4a1befcbe6ab324940978e48c0f4d1 (diff)
downloadqtwebengine-8fd6601ef64dc22e48ec9c14440262f88d82cd4e.tar.gz
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. Pick-to: 6.3 6.2 Change-Id: Iab7cc48c2bb4f8c7fb4af7965c1183388a53527b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Functions.cmake1
-rw-r--r--cmake/Gn.cmake1
2 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index fef9c15e1..08967d6db 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -1125,6 +1125,7 @@ function(add_gn_command)
-DSOURCE_DIR=${CMAKE_CURRENT_LIST_DIR}
-DMODULE=${arg_MODULE}
-DQT_HOST_GN_PATH=${QT_HOST_GN_PATH}
+ -DPython3_EXECUTABLE=${Python3_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 d8195325f..951e5f83e 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_program(Python3_EXECUTABLE NAMES python3 HINTS $ENV{PYTHON3_PATH})
if(NOT Python3_EXECUTABLE)
find_package(Python3 3.6 REQUIRED)
endif()