Implementing cmake fix from Artox/arcemu@d2ad93b75c14a09857a8f094fae19fcf0358144d