CMake: fail if dependencies are not present

The user experience is dramatically improved if we fail at
configuration than at linking.