switch a modular cmakelists file

Replaces the first part of the 'sample' branch.