Clean old cmake files
Full rewrite of all CMakeLists

CMake now works on all platforms
Fix building on non-MSVC compilers

This function is inline, and QVariant uses a copy-on-write like copying mechanism, like most datatypes in Qt.
Merge pull request #1 from BtbN/cmake

Cmake Update by BtbN