I want to add a variable to use inside my .gpy file but I dont want to define it inside a .gyp file but outside. Usually variables are set in the gyp dictionary and can then be used in this file or dependant files. However, I want to set the variable outside of gyp so that all parsed gyp files can use it without it being hardcoded in any of them. Im using windows and this is what I have tried
Batch file to start the process
set GYP_MSVS_VERSION=2015
set GYP_DEFINES="TOOLSET=v140"
gclient --runhooks
How TOOLSET is being used in a .gyp file that gets parsed from the above gclient --runhooks
'msbuild_toolset': TOOLSET,
Gyp output:
NameError: name 'TOOLSET' is not defined while reading test.gyp
Any idea how I can get this working? Thanks