Some cleanup of cmake code. Added WIN32 and Linux conditionals.