Avoid the very common name ‘build.h’ in favour of something clearer and FlightGear specific.
Use a custom_target to recursively invoke Cmake at build time; this ensures the build ID and Git revision are always up to date.