Cmake env var

Can somebody who actually understands the magic of the toolchain stuff review this?