build: improving robustness of automatic vanilla cmake integration