Tidy up cmakelists for core lib a bit