modified cmakelists to ensure message dependencies are built first