Changed so that cmake can be built from the top

And removed building of example in main cmake file
sice it does not work anymore.