diff options
author | Dimitrios Apostolou <jimis@qt.io> | 2022-03-22 14:15:36 +0100 |
---|---|---|
committer | Dimitrios Apostolou <jimis@qt.io> | 2022-03-30 21:25:17 +0000 |
commit | 99e443341417fa00a5c15fc9e75c8f27896b23f5 (patch) | |
tree | ec5557c2bf43a2a640e034aa84ce920f472094cc | |
parent | 32eb3e33d0ad12d64296604647e4cfcc20cd2db2 (diff) |
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 <michal.klocek@qt.io>
(cherry picked from commit 8fd6601ef64dc22e48ec9c14440262f88d82cd4e)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r-- | cmake/Functions.cmake | 1 | ||||
-rw-r--r-- | cmake/Gn.cmake | 1 |
2 files changed, 1 insertions, 1 deletions
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}) |