Added CMakeLists.txt, fixed compilation on gcc

CMakeLists.txt for other platforms, builds for Linux/gcc