You really don't want me writing my own CMake code. 

I am hoping for a concrete example that can be used or adapted for the text.