Add main() declaration
Add cmake support

This is very lazy cmake rules and I think it can be better.
Merge pull request #1 from Oleh-Kravchenko/master

Add cmake support