Fix cmake error if externals not build first