Add cmake build files.
Implement --define command-line option.