Update CMake snippet.
Add Apache license to C snippets