cmake: Rollup of srb2-side changes See merge request KartKrew/Kart!758
Also support dynamic/static opengl switching