fix compilation on Windows
add header files to CMake dependency list
Fix VC warnings (unused variable, implicit float to int conversion, implicit double to float conversion).