cmake: move functions to src/cmake

No match.