We use something like that in the former configure script to check if libraries were present. I am not sure how are we currently handling this in cmake though. I thought this `FIND_PACKAGE` was taking care of this.