Gstreamer support missing for OpenCV in Jetpack 4.2.

I have built opencv 3.4.0 from source but it is missing gstreamer support. I can’t access camera module on the board. nvcamerasrc is not working but nvgstcapture-1.0 is working.

Posting the error obtained:

nvidia@nvidia-desktop:~$ gst-launch-1.0 nvcamerasrc ! ‘video/x-raw(memory:NVMM), width=1280, height=720,format=I420, framerate=(fraction)30/1’ ! nvvidconv ! ‘video/x-raw, format=BGRx’ ! videoconvert ! ‘video/x-raw, format=BGR’ ! tee ! v4l2sink device=/dev/video1
WARNING: erroneous pipeline: no element “nvcamerasrc”

nvcamerasrc is deprecated. Please use nvarguscamerasrc.

Please use “nvarguscamerasrc”.
“Legacy nvcamerasrc plugin support is
deprecated” per 32.1 Accelerated GStreamer User Guide. FYI.