For additional information, refer to the CMake mailing list, or study an existing implementation (such as ITK or VTK or VXL).