Makes camke building more modular.
Changes some files to acomodate them to the new cmake module ConfigPackage.