How can I find out my computer supports Nvidia Graphics Card or not at run time?

I am trying to find out that my system supports nvidia graphics card and cuda or not. My system has Intel graphics card there is no nvidia card installed on my system but i want to check because i am writing a generic lib.

Statically link to cudart library (which is the default when compiling with nvcc, but you can statically link with your host compiler as well).

Then run cudaGetDeviceCount at the beginning of your program.

http://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f

check both the returned device count as well as the runtime error code.