cleanup of cmake files

- add license
- check build type
- add section marker