TerraView is included in TerraLib as one of its modules, therefore, it is necessary to build the terralib library before building TerraView.
General information regarding the compilation process of the terralib library are detailed at TerraLib Build and Install
Also, make sure your compiling environment is prepared by following the instructions at Working Environment
Follow the steps detailed at TerraLib - Cmake
The only difference worth mentioning is that, like most modules, terraView is optional, so in order to be sure it will be compiled, set TERRALIB_TERRAVIEW_ENABLED on cmake interface at TERRALIB group.
Follow the steps detailed at TerraLib - Cmake
The only difference worth mentioning is that, like most modules, terraView is optional, so in order to be sure it will be compiled specify its variable as true.
cmake -G 'Visual Studio 10' C:\Terralib\codebase\build -DTERRALIB_TERRAVIEW_ENABLED=True