From b08794a6c26ff638dd797089fbb7498cf99dc6c6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 18 Mar 2021 22:03:29 +0530 Subject: [PATCH] Make the full vcvars env available for the benefit of qmake --- setup/build_environment.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup/build_environment.py b/setup/build_environment.py index 742ed5daef..41dccb1021 100644 --- a/setup/build_environment.py +++ b/setup/build_environment.py @@ -32,8 +32,11 @@ if iswindows: MT = 'mt.exe' win_cc = 'cl.exe' win_ld = 'link.exe' - win_inc = [x for x in env['INCLUDE'].split(';') if x] - win_lib = [x for x in env['LIB'].split(';') if x] + win_inc = [x for x in env['INCLUDE'].split(os.pathsep) if x] + win_lib = [x for x in env['LIB'].split(os.pathsep) if x] + for key in env: + if key != 'PATH': + os.environ[key] = env[key] QMAKE = 'qmake' for x in ('qmake-qt5', 'qt5-qmake', 'qmake'):