Main CMake file improved for use with cross toolchains