[merge] cmake pr-20140808-rfree-otshellutils

changes for cmake from the
pr-20140808-rfree-otshellutils
while it waits for merging