I have looked into installing the latest stable release of osg: OpenSceneGraph-3.4.0.zip. I can easily install osg using Ubuntu Software centre by searching for openscenegraph and selecting "3D scene graph, utilities and examples (binaries)" to install. only problem is it does not allow me to do the latest stable release. It does only 3.2. SO only way seems to do building from source using CMake. I am new to building from source and tried to find online guide for 2 days but couldn't. Could someone tell me what are the detailed steps to building osg3.4? Or just link to such a tutorial?
As discussed in the comments, OP is open to using PPAs instead of building from source.
The OpenMW PPA provides OpenSceneGraph 3.4 as it is one of OpenMW's dependencies. To install OpenSceneGraph 3.4, you run:
sudo add-apt-repository ppa:openmw/openmw sudo apt update sudo apt install openscenegraph-3.4