The build environment variables are recorded at the top of the generated bld.bat file (look for it in the "work" for alongside your source.)
You may be able to simplify this by just setting visual studio to run bld.bat directly to do its build. This will probably end up with visual studio calling the batch script, which then calls cmake and then visual studio, so kind of convoluted, but it would be easier than trying to pass the variables into the solution file directly.
If you'd like to contribute something that facilitates recording these environment variables into generated solution files, I'd be happy to review it. Unfortunately, I probably won't be able to do such a thing myself on any reasonable timescale.
Best,
Michael